Keeping Your Spry Tables in Sync with Your ColdFusion Reports
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:
[Warning: I sometimes work in the financial sector and I take my examples straight form my current projects. You'll find no foo=bar here, but I'm sure you can figure out what I'm doing. If not, comment or email.]
< scr i pt language="javascript">
var dsleaseEndings = new Spry.Data.XMLDataSet("/xml/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. (note the curly {} brackets containing spry data)
Within report builder, create a SQL statement with an order By cluse that contains the URL variables:
From ....
Where ...
ORDER BY #param.column# #param.sortOrder#



There are no comments for this entry.
[Add Comment]