PDA

View Full Version : How can I set Reporttitle from within the program?



Boris
3-Aug-2010, 05:13 PM
I can't find it on the help.

Thanks in Advanced.
Boris Reyna

Vincent Oorsprong
4-Aug-2010, 05:43 AM
Boris,

You cannot do that. You need to set it at design time.

But, why would you like to do that?

You can however create a function field in the report and address this with psFunction from the cVisualReport object.

Boris
4-Aug-2010, 08:30 AM
Ok, thanks for the tip, will do. But better create a function to set it directly from within the application. I do it with all my reports in CR.

Vincent Oorsprong
4-Aug-2010, 08:35 AM
Boris,

Csn you explain - except for you doing this right now in Crystal Reports - why you would need it? The function is IMHO a very good alternative.

Boris
4-Aug-2010, 08:40 AM
All of my reports have the ReportTitle field in the page header. My application is multi-company, so, I set the reporttitle to the currently selected company, so the user know where the data is coming from.

Vincent Oorsprong
4-Aug-2010, 09:57 AM
Boris,

So you can and want to use a formula and change the contents with psFunction...

Boris
4-Aug-2010, 10:49 AM
Yes, this is what I did in my first production report. BUT, if David Martinko decides to make a conversion program, the reporttitle field will be replaced by the equivalent in VRW and you can figure out where I'm going with this.
This "function" approach will be Ok for new reports, not old.