• Meiriando Teja Artanta Sembiring
  • NEWBIE
  • 0 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 0
    Replies
Hi,

i have some unique requirement now. i have to make report that show like this table below.(i changed the theme to pokemon to make easily understanding).
Pokemon NamePokemon LocationElement Lightning DefenceElement Fire DefenceElement Water DefenceElement Earth Defence
BulbasaurForest0010050
PikachuGrass5000100
CharizardMountain0501000
LaprasSea0100500

i have 3 List =
1. list a<Master_Element>
2. List b<Pokemon_Name>
3. List c<Defence_Atrribute_Each_Pokemon>

the requirement are :
1. not hardcode for the element.if someone add master element, automatically the report will show the new element with the attribute. dont have to change the Visualforce Page.

for the table header i already succesfull make like this below.
<table>
<thead>
<tr>
                    <td align="Center"> Pokemon Name </td>
                    <td align="Center"> Pokemon Location </td>
                        <apex:repeat value="{!Element}" var="e"> 
                        <td align="center">{!e.Element_Name__c}</td>
                        </apex:repeat>
</tr>
</thead>
<tbody>
<apex:repeat value="{!Pokemon}" var="f">
                    <tr>
                        <td>{!f.Pokemon_Name__c}</td>
                        <td>{!f.Pokemon_Location__c}</td>
                         <apex:repeat value="{!DefElementValue}" var="g"> 
                        	<td  align="center">{!g.Def_Pokemon_Element__c}</td>
                        </apex:repeat>
                      <tr>
</apex:repeat>
</tbody>
</table>

my question are:
1. me stuck on show up the def element (remember that the value will follow how many master element exist automatically)
2. Is there any other idea to solve this requirement?maybe like {!defElementValue} get the pokemon name first (filter the list based on what pokemon on that row)

me really desperate for this one, deadline already close anyway. T_T
thank you guys.


TJ