Focal Point
ReportCaster - Help with Best Practice

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/6031098331

August 25, 2005, 07:14 PM
gypsy
ReportCaster - Help with Best Practice
Hi Fellow FOCUS developers,

I've written one WF533 report for RC and the same one accessed by UI front end. Both reports are supposed to be exactly the same output. The RC report just mails a daily snapshot, the UI version allows user to enter their own From and To date, plus a few other options.

I originally felt that RC was different enough to keep all RC reports in one folder separated from the rest of my UI reports(it was new to me two months ago). Now, I'm trying to figure out if I should modify the RC code to make it callable from the UI and RC scheduler. This would eliminate maintenance of two files that do almost the same thing but it would make for some ugly code, and I like clean code.

Has anyone else had this scenario and what is your experience or recommendation?

Thanks in advance for your comments! Smiler
August 26, 2005, 01:12 PM
Boogarweed
You can read the documentation to see exactly how, but RC allows you to pass parameters to your reports so that they perform properly. In the above example you could pass a parameter that tells you fex to use today's date for both "from" and "to" dates. I hope this is what you were looking for....
August 26, 2005, 01:56 PM
Steve C
You should keep only a single version of a procedure to ensure that any future enhancements are automatically reflected in your RC and UA versions. Like Boogarweed said above, you can run your focexec with any parameters you choose from RC, so there is no need whatever to keep two versions.
August 26, 2005, 02:14 PM
codermonkey
We've approached this such that we set -DEFAULT amper variables to the values the Caster requires. For the ad hoc/on-line access, we prompt for the variables and overlay the default values. Works well for us.
August 31, 2005, 02:14 PM
gypsy
Thank you all very much. I appreciate the advice and comments!