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

Printing Multiple reports!!

Status
Not open for further replies.

abhi81

Programmer
Jan 13, 2007
18
0
0
Hello All,
I want to fire reports based on the series of order numbers. I know i can use reportselectionformula to fire report on a single order number but how do i handle this if there is a requirement to print 50 order numbers at one time, i.e., 50 order numbers are passed as arguments and all the order numbers should be ready to print.

Each report is a separate invoice based on the order number supplied to the report.

I tried using comma separated order numbers but what happens now is that it only prints the last order number. My code is in vbscript as follows:

ordno="10000,10001,10002"
Session("oRpt").RecordSelectionFormula = "{ReportView1.order_num} in ["
&ordno & "]"

Basically now what i want is this. When the user hit the print button the report viewer should have like 3 pages of report 1 for each order number so that all these invoices can be sent to the printer for printing.

To find out the problem i opened the report in the designer and previewed it. No code. Then modified the record selection formula to get the desired result but no success.

Any help will be appreciated.

Thanks in advance.
 
Your post is confusing.

You say you have 50 order numbers, then you say "When the user hit the print button the report viewer should have like 3 pages of report 1 for each order number". How could that be?

You don't state what software is used to call Crysta, the Crystal version, the database being used, the data type of the order number, so it's difficult to assist you.

Giving descriptions can be helpful, but supply basic technical information.

One method would be to create a parameter in Crystal of the appropriate data type and state multiple values.

Then set the values.

In VB it's something like:

oRpt.ParameterFields(1).AddCurrentValue "12345"

Then hardcode the record selection formula rather than passing it:

{ReportView1.order_num} in {?ordno}

The record selection should work as well, but youneed to have the syntax correct for the data type.

-k

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top