On 9/26/07, Rob Parkhill <[EMAIL PROTECTED]> wrote: > > Good Afternoon, > > How would one go about passing a structure to a CFR file and then access > the data within the CFR. I have a lot of preprocessing to perform on the > data before I can put it into the report (my DB designer decided to store > raw values, but everyone wants to see calculated values... duh)
I highly recommend doing as much data crunching as you can in the db. In my experience the db's optimizer usually is more performant for that sort of thing than doing it in SQL. It may mean learning some new SQL functions but you'll be better off. > The easiest way I could come up with to create the calculated values was > through the use of structures. I now need to pass three structures to the > report. I guess that I can do that through the cfreportparam tag, but then > how can I reference those struts in the report itself. > > Would the input parameter for the Report be an object? does that allow me > access to the different levels of the Struct? > I'm not certain if you can pass complex variables in the report parameters or not. If you can, they'll be accessible in the param scope in CFR. If you can't pass complex variables, you could serialize the structs using CFWDDX and pass the string value of each struct in separate parameters. Then use custom report functions to unserialize them into structs again and extract the values on demand. /hofo -- Howard Fore, [EMAIL PROTECTED] "In any moment of decision, the best thing you can do is the right thing, the next best thing is the wrong thing, and the worst thing you can do is nothing." - Theodore Roosevelt ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| ColdFusion 8 - Build next generation apps today, with easy PDF and Ajax features - download now http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289581 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

