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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I use one parameter on multiple reports? 2

Status
Not open for further replies.

BradW

IS-IT--Management
Nov 30, 2000
126
US
I have several reports that I run on a weekly basis. Many of these use a date range parameter with start date and end dates being set by parameter. Is there a way that I can enter the parameter values once and then fire off several reports using that same parameter?

Thanks in advance for all help.
 
Only if the reports can be incorporated as subreports of one main report. If so, they can be linked and then one set of parameters can be shared.

Keep in mind that they have to have the same orientation, and (unless you do quite a bit of reworking) they will all have the page header and footer of the main report. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
You mentioned that you run these reports on a weekly basis.

Frequently, this means that there is fixed logic associated with the date range you want for these reports (for example the last 10 weeks including the week that has just ended).

If that is the case, you can typically code the logic as formulas insead of user provided parameters.

If the parameter logic is not fixed, then another approach (assuming you want to avoid providing the parameter values and invoking Crystal programmatically) is to update a table with the needed parameters and use that table to your reports.

Cheers,
- Ido
 
Thanks to both Ken and Ido!

Ken, I was afraid that this was the answer, but wanted to make sure that I wasn't missing some way of using a stored value to do this.

Ido, some of them are for the prior week's data, provided that I can get the user to run them on the same day every week, your ideas about fixed date formulas might just work. Thanks much!
 
Ido had solid instincts. There is an automatic "LastFullWeek" function that will allow the report to be run on any day of the following calendar week. Other formulas can be written to allow different periods if needed. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
You can also use functions such as:

Last4WeeksToSun
Last7Days
LastFullMonth
...

Cheers,
- Ido
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top