+ Start a Discussion
stefanodlstefanodl 

Sort DataTable in Visualforce Page Rendered as PDF

Hello,

 

I've created a Visualforce Page to generate PDF orders from a custom object (Orders).

In this page there are datatable merging data from Related list of Orders. 

When the pdf is generated those related lista are not in the same order as in the Order Detail Page.

I read that some Apex controller  need to be added to the page.

Can some one help me on this?

 

Thanks,

Stefano di Leone

David KingeryDavid Kingery

Find the query that populates your list and add "order by" to the end of it.

(select Id, Name, Location__c, City__c, State__c, Lateral__c, Port_Handoff_Speed__c from QR_Locations__r order by Name)

 

Craig RosenbaumCraig Rosenbaum
I'm facing this same issue. Can somebody explain where I would edit or put that SOQL query?