function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Arjun KodialaArjun Kodiala 

apex:repeat alignment issue in PDF

Hi, 
I have developed a VF page pdf file with renderas.  I am using Apex:Repeat tag to display  parent and child information. 

Data is showing correctly, but the alignment is not in the proper order. 

<apex:repeat value="{!Goals}" var="G">
<td> {!G.Area__c}
<td> {!G.Risk__c}
   <apex:repeat value="{!Actions}" var="A">
      <td> {!A.Description__c}
      <td> {!A.Status__c}
   </apex:repeat>
</apex:repeat>

    Apex:Repeat Alignment  Issue

Thanks.

Alexander A 7Alexander A 7

Hi Arjun Kodiala,

Please check your Html-Table Syntax.

Syntax

<table>
<tr>
<apex:repat>
<td> </td>
</apex:repat>
</tr>
</table> 

If you got Kindly choose it as a Best Anser
Arjun KodialaArjun Kodiala
Hi Alexander,

Thanks for the quick reply, We have written the code as you mentioned only.  But what i didn't specify in the previous post was </br> tag at the end of first </apex:repeat>. Because we need a single line space after one Goal and its Details. If i remove <br/> tag then alignment is proper, but we need a line after each Goal and Details. How can we solve that problem?

<table>
 <apex:repeat value="{!Goals}" var="G">
 <tr> 
     <td> Area </td>
     <td> Risk </td>
 </tr>
 <tr>
     <td> {!G.Area__c} </td>
     <td> {!G.Risk__c}</td>
 </tr>
       <apex:repeat value="{!Actions}" var="A">
              <tr>
                   <td> Description </td>
                   <td> Status </td>
              </tr>
              <tr>
                    <td> {!A.Description__c} </td>
                    <td> {!A.Status__c}</td>
              </tr>
            </apex:repeat><br/> // Alignment missing because of <br/> condition.
   </apex:repeat>
</table>

Thanks.