You need to sign in to do that
Don't have an account?
Issue with repeat tag while rendering as pdf
Hi Everyone,
I am having a strange problem while rendering a page as pdf.
Please help guys!
Problem :
I am trying to use apex:repeat for iterating over a List<List<Sobject>>. my VF page as html renders well.
But when I try to render it as pdf ,it gives me a blank pdf.
My Code :
<apex:Page .... renderas="pdf">
<apex:repeat value="{!ListListOFSOBJECT}" var="list" id="theRepeat">
<table >
<apex:repeat value="{!list}" var="item">
<tr>
<td>
{!item.name}
</td>
</tr>
</apex:repeat>
</table>
</apex:repeat>
</apex:page>
This is resulting into blank pdf.
As a workaround i tried to pass the list <apexclassX> to repeat tag
where class X {
list<SOBJECT>
}
But this approach also resulted in a blank pdf.
Please Help!
Any Idea on this?
I'm also encountering this issue. Did you ever find a workaround?
I have found that the pdf page will not gather the data. The data needs to be in the list before calling the page. Therefore you need to call a page that will show the data and have a button on the page that calls a method that calls your pdf page. The data will already be in the list so it will show in the page.