You need to sign in to do that
Don't have an account?
B2000
Creating a link with the get.value method in the Reports.ReportDataCell getDataCells
I would like to create a link using the value of get.value() method when the object is an Id. I have a working solution but wonder if there is another I'm missing. Here is the code:
This is what I would like: <apex:repeat value="{!reportResults.factMap['T!T'].rows}" var="row" > <tr> <apex:repeat value="{!row.dataCells}" var="cell"> <td> <apex:outputText value="{!cell.label}" rendered=“{!IF VALUE NOT AN ID}”/> <apex:outputLink value="/{!cell.value}”rendered=“{!IF VALUE IS AN ID}”/> {!cell.label </apex:outputLink> The code below works but is there a better solution? VP Page <apex:variable value="{!0}" var="cnt"/> <apex:repeat value="{!reportResults.factMap['T!T'].rows}" var="row" > <tr> <apex:repeat value="{!row.dataCells}" var="cell"> <td> <apex:outputText value="{!cell.label}" rendered="{!AND(cnt<listIds.size,listIds[cnt]='BLANK')}"/> <apex:outputLink value="/{!listIds[cnt]}" rendered="{!AND(cnt<listIds.size,listIds[cnt]!='BLANK')}"> {!cell.label} </apex:outputLink> </td> <apex:variable value="{!cnt+1}" var="cnt"/> Controller: for (Reports.ReportDetailRow rd : factDetails.getRows()) { for (Reports.ReportDataCell cd : rd.getDataCells()) { listIds.add('BLANK'); if (cd.getValue() instanceOf Id) listIds[listIds.size()-1] = (String)cd.getValue(); } }Thanks