DataExport missing last record only in PDF format

UI Components for JSF
Post Reply
User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

02 Aug 2009, 13:55

When I use the p:dataExporter for a rich:dataTable (RichFaces) or p:dataTable, the last row is not coming up in the exported PDF file (No Exception occuring on the server side).

Export to csv, xml works fine for the same scenarios. Its only the PDF export missing the last record. Any suggestion?

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

02 Aug 2009, 18:14

Strange, I couldn't replicate this with online showcase demo, last record is there in pdf export. Can you test with the online demo?

User avatar
bercolax
Posts: 133
Joined: 02 Aug 2009, 13:27
Location: Courtallam, India
Contact:

02 Aug 2009, 18:51

Online demo is working fine. It showed the records from 0 to 99. So I paid attention to the output content than just counting the rows :)

I had the last (5th) column as h:commandLink to view the score as below.

Code: Select all

   <p:column>
            <f:facet name="header"><h:outputText value="View Score" /></f:facet>
            <h:commandLink action="#{reportcenter.viewScore}">
                <h:graphicImage value="/img/ok.png" style="border:none;"/>
            </h:commandLink>
        </p:column>
The 5 columns displayed in the dataTable were
ExamId ExamName ScheduleId PublicURL ViewScore

So the PDF when exporting the data was assigning the ExamId of the 2nd row to the View Score column of the 1st row and so on. Because I tested with 4 rows, the result was 3 rows in the PDF where as in CSV, XML it was exported as 4 rows.

Solution: Excluding the column from the exported report worked for me.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 18 guests