Have a custom List View button which opens a VFP and renders the results as PDF. (easy stuff, standard controller and nothing funky). I would have thought that any sorting applied to the list view would be applied to my opening page. So if I sort on Deal Report Order then my PDF page would be sorted the same way.
Anyone know what I mean? Should it work like that?
Here is the standard List View showing the sorting
I would expect the order on the VFP / PDF to show Account 1, 2, 3 and 4 in that order.
VFP
<apex:page standardController="Account" recordSetVar="accs" showHeader="false"
sidebar="false" standardStylesheets="false" renderAs="pdf"
applyHtmlTag="false" applyBodyTag="false">
then doing this
<apex:repeat value="{! accs }" var="a">
Here is the full VFP
<apex:page standardController="Account" recordSetVar="accs" showHeader="false"
sidebar="false" standardStylesheets="false" renderAs="pdf"
applyHtmlTag="false" applyBodyTag="false">
<apex:stylesheet value="{!$Resource.tables}"/>
<head>
<style type="text/css">
@page {
margin: 1em;
size: A4 Landscape;
@bottom-left {
/* content: "Date {!DAY(TODAY())}.{!MONTH(TODAY())}.{!YEAR(TODAY())}"; */
font-family: sans-serif;
font-size: 5px;
}
@bottom-right {
content: "Page " counter(page) " of " counter(pages);
font-family: sans-serif;
font-size: 7px;
font-weight: bold;
}
}
table {
-fs-table-paginate: paginate;
}
thead {
display: table-header-group;
background-color: #fff !important;
}
table {
font-family: sans-serif;
font-size: 8px;
width: auto;
}
tbody {
counter-reset: rowNumber;
}
tbody tr {
counter-increment: rowNumber;
}
tbody tr td:first-child::before {
content: counter(rowNumber);
}
.logo-wrap tr {
border-right: 1px solid #cbcbcb;
}
th, td th, {
border-top: 1px solid #cbcbcb !important;
text-align: center !important;
}
.pure-table .border-right th, .pure-table .border-right td{
border-right: 1px solid #fff !important;
border-left: 1px solid #fff !important;
border-top: 1px solid #fff !important;
border-bottom: 1px solid #fff !important;
text-align: left !important;
font-weight: bold;
font-size: 6px;
}
tr{
text-align: center !important;
}
.nowrap-header{
white-space: nowrap !important;
}
.grow{
width: 100%;
}
</style>
</head>
<body>
<table>
<tr class="border-right">
<th><apex:image url="/resource/1433857887000/StarwoodLogo600x400" width="75" height="35"/></th>
</tr>
<tr class="border-right">
<td style="font-weight: bold;">ACQUISTIONS PIPELINE</td>
</tr>
<tr class="border-right">
<td style="font-weight: bold;">SOF - Real Estate Pipeline</td>
</tr>
<tr class="border-right">
<td>
<apex:outputText style="font-weight: bold;" value="{0,date,MMMM dd, yyyy}">
<apex:param value="{!TODAY()}" />
</apex:outputText>
</td>
</tr>
</table>
<table class="pure-table pure-table-horizontal">
<thead>
<tr class="centre-cols">
<th >
Deal Name
</th>
<th>
Stage
</th>
<th>
Team
</th>
<th>
Purchase Price
</th>
<th>
Total SCG Equity
</th>
<th class="nowrap-header">
Area <br/> (sq ft/sq m)
</th>
<th>
Asset Class
</th>
<!--
<th>
Asset Type
</th> -->
<th>
On/Off Marketing
</th>
<th>
Bid
</th>
<th>
Close Date
</th>
<th>
SCG Office
</th>
<th>
Transaction Facts
</th>
<th>
Transaction Updates
</th>
</tr>
</thead>
<tbody>
<apex:repeat value="{! accs }" var="a">
<tr>
<td> ) <apex:outputField value="{! a.Name }"/> <br/>
<div style="font-style: italic !important;"> <apex:outputField value="{! a.City__c}"/> <apex:outputField value="{! a.Country__c}"/> </div>
</td>
<td> <apex:outputField value="{! a.Stage__c }"/> </td>
<td> <apex:outputField value="{! a.Owner.Name }"/> </td>
<td> <apex:outputField value="{! a.Purchase_Price_Rounded__c }"/> </td>
<td> <apex:outputField value="{! a.Total_SCG_Equity_Rounded__c }"/> </td>
<td> <apex:outputField value="{! a.Area_UOM__c }"/> </td>
<td> <apex:outputField value="{! a.Asset_Class__c }"/> </td>
<!-- <td> <apex:outputField value="{! a.Asset_Type__c }"/> </td> -->
<td> <apex:outputField value="{! a.On_Market_Off_Market__c }"/> </td>
<td> <apex:outputField value="{! a.Bid__c }"/>
<apex:outputField value="{! a.Bid_Date__c }" /> </td>
<td> <apex:outputField value="{! a.Close_Date__c }"/> </td>
<td> <apex:outputField value="{! a.SCG_Office__c }"/> </td>
<td style="text-align: left !important; display:block" > <apex:outputText value="{! a.Transaction_Facts__c }" escape="false"/> </td>
<td style="text-align: left !important;" > <apex:outputText value="{! a.Transaction_Updates__c }" escape="false"/> </td>
</tr>
</apex:repeat>
</tbody>
</table>
</body>
</apex:page>