1 Reply Latest reply: Sep 17, 2013 8:35 AM by Eddie Lotter RSS

    manipulate recordset inside cfr

    robylab Community Member

      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

        • 1. Re: manipulate recordset inside cfr
          Eddie Lotter Community Member

          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.