You need to sign in to do that
Don't have an account?
Kim Grondsma
Sort order of PDF different from quote page?
I have created a visualforce page to render a good looking qoute PDF
This work, all the styling is exactly what I want.
However when rendering the PDF the Quote line items appear in a different sort order than they are sorted on the qoute detail page in the related list.
How can I have the PDF display the same order?
Because the styling is the main reason I reverted to PDF I would like t stick with the code for the table, just add something to control the sorting
This is my visualforce page code:
<td style="width: 13%; text-align: center; font-size: 10pt;"><apex:outputText value="{0, number, integer}">
<apex:param value="{!line.Quantity}"/> </apex:outputText></td>
<td style="width: 44%; font-weight:bold; font-size: 10pt;"><apex:outputField value="{!line.Product2.Name}" /></td>
<td style="width: 20%; text-align: right; font-size: 10pt;"><apex:outputField value="{!line.UnitPrice}" /></td>
<td style="width: 20%; text-align: right; font-weight:bold; font-size: 10pt;"><apex:outputField value="{!line.TotalPrice}" /></td>
<td></td>
</tr>
<tr>
<td></td>
<td font-size=" 10pt" margin-right= "0.5cm" ><apex:outputField value="{!line.Product_description__c}" /></td>
</tr>
<tr>
<td colspan="5" class="bottomborder"> </td> </tr>
</apex:repeat>
This work, all the styling is exactly what I want.
However when rendering the PDF the Quote line items appear in a different sort order than they are sorted on the qoute detail page in the related list.
How can I have the PDF display the same order?
Because the styling is the main reason I reverted to PDF I would like t stick with the code for the table, just add something to control the sorting
This is my visualforce page code:
<td style="width: 13%; text-align: center; font-size: 10pt;"><apex:outputText value="{0, number, integer}">
<apex:param value="{!line.Quantity}"/> </apex:outputText></td>
<td style="width: 44%; font-weight:bold; font-size: 10pt;"><apex:outputField value="{!line.Product2.Name}" /></td>
<td style="width: 20%; text-align: right; font-size: 10pt;"><apex:outputField value="{!line.UnitPrice}" /></td>
<td style="width: 20%; text-align: right; font-weight:bold; font-size: 10pt;"><apex:outputField value="{!line.TotalPrice}" /></td>
<td></td>
</tr>
<tr>
<td></td>
<td font-size=" 10pt" margin-right= "0.5cm" ><apex:outputField value="{!line.Product_description__c}" /></td>
</tr>
<tr>
<td colspan="5" class="bottomborder"> </td> </tr>
</apex:repeat>
Shashank (Salesforce Developers)
If you notice that the quote line items are sorted by product, it is probably due to this limitation: https://success.salesforce.com/ideaView?id=08730000000YHmBAAW