Talk:Spry:Tips
From Adobe Labs
Do you give your customers the option of printing a ColdFusion report of the tables you create with Spry? If so, keep the report and the table in sync using this tip.
First when converting your query data to XML, use the sortOnLoad and sortOrderOnLoad attributes:
<script type="text/javascript"> var dsleaseEndings = new Spry.Data.XMLDataSet("/xml/<cfoutput>#Session.Login.Company.CustID#</cfoutput>/leaseEnding.xml", "leaseEnding_report/vehicle", { sortOnLoad: "DRLASTNAME", sortOrderOnLoad: "descending" });</script>
Then use the ds_SortOrder and ds_SortColumn variables in your link to build your ColdFusion report.
<a href="/reports/leaseEndingsReport.cfr?custID=#CustID#&coName=#name#&sortOrder={ds_SortOrder}&column={ds_SortColumn}" target="_blank">Print</a>
Regards,
Christopher Walker
Shared Dynamics, LLC
http://www.shareddynamics.com
