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!

How to run a Report Several times by passing in multiple variables

Status
Not open for further replies.

kgreer

MIS
Jul 18, 2003
155
US
I have a Crystal Report that I call from a ASP page. I want to pass it multiple Part numbers and make it print out a new report for each page. In the Report I am using three different sub-reports. First one is a Pick List, second is the order, third the router. For every part I want all three subreports to run, once it is done with the first one I want it to produce the same reports for the second one, etc...

If I need to explain more, please let me know.

Thanks.
 
A simple approach is to pass the part numbers as a mult-value parameter, set the record selection fromula to ensure the report includes only these parts, group the report and start each part on a new page, and place the subreports in the group header.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Maybe I am not explaining my situation enough. The sp that I am calling is allowing only one part parameter at a time. All three of my subreports are in the header section. I want it to print out the first part number then move on to the next part. But I want all three subreports to run on part one then run again on part two and so on. If I need to send the report let me know.

Thanks for the input.
 
Consider changing the SP to accept a delimited string of multiple part numbers...

Cheers,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
I don't want to allow my sp to handle mult parts. I want to print one Pick list then print a bill of material, then my third sub-report. When it has reached the third sub-report with the first part I want it to take the second part and start over at the first sub-report. Am I not making any sense?
 
You could use your asp code to call the report multiple times, passing a different part each time.

There is no way (that I'm aware of) to do this in a single call.

Again, if the report can contain and be grouped by these part numbers, the problem is solved. You simply embed the subreports in the Group Header and/or Footer.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for you input. I don't want to have to open a new page for every part number printed.

They will have to suffer.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top