Skip to main content
Participating Frequently
December 4, 2012
Question

manipulate recordset inside cfr

  • December 4, 2012
  • 1 reply
  • 836 views

with cfreport i can add some function to my report.

i would access to recordset (passed to cfr) for ordering it.

query to cfr -> ordering recordset in cfr -> print

is this possible?

thanks

This topic has been closed for replies.

1 reply

EddieLotter
Inspiring
September 17, 2013

Yes, this is possible.

For example, in the calling CFM file, add your parameter:

<cfreportparam name="prmOrderBy" value = "order by LastName">

Then, in Report Builder, add the following line at the bottom of the SQL query:

#param.prmOrderBy#

Naturally you wouldn't hard-code the "order by" clause, you would use a variable.

You could, of course, handle the query dynamically in your calling CFM file and pass the query result-set to the report so that the report does not run its internal query.