Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subreport to simplify page header standard?

Status
Not open for further replies.

dean12

MIS
Oct 23, 2001
273
US
I've got about 200+ Crystal 8.5 reports. I'm trying to go through these (they have been developed over a number of years) and make them consistant visually. That means a consistant page header, fonts, etc.

So far, I have been editing these one at a time but that is very tedious. I got to thinking that perhaps I could make a subreport that served as the page header and drop that on each of my reports.

OK, I did that and it works - basically. Of course the issue is that I have variables on the subreport that represent different things in the page header. For example:


@rpt_title @co_name
@client_name Page N of M

I need to substitute in values for these 3 fields (rpt_title, client_name, and co_name). I also need to print the page number (i.e. 4 of 500).

How to best get these values over to the sub-report? I would really like to circumvent having all sorts of complex linkages.

Appreciate the feedback.
 
Well here's what I did so far and it seems to work:

1. I created a subreport and on that subreport placed a formula called "rpt_title".

2. In the actual formula itself for "rpt_title", I said:

shared StringVar srlink_Title;
srlink_Title

3. In the main report, I had a formula called "argTitle" and there I said:

shared StringVar srlink_Title := argTitle;
 
You might want to check out Crystal Reports v9. It has a repository for storing shared items such as graphics, formulas so if you make a change in the repository your reports will pick up the new graphic (logo , company header etc) . It also has a template function whereby you can tell it to use a certain .rpt as the template. It will then apply the same Header/Footer, fonts, colours etc.
 
Ah.....very interesting. With Upgrade being purchased with 8.5, I'm anxiously awaiting version 9
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top