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!

print number of copies based on a parameter?

Status
Not open for further replies.

staceyn

Technical User
Nov 19, 2004
107
US
How to enter the number of copies you want of a Crystal Report based on a parameter?

What I have is a situation where my customer is going to do a Goods Receipt PO with Lot numbers, then for each lot on the GRPO they need to print identification sheets that have some human readable information, and the lot# as a barcode. We will not know the number of copies we will need until we know how many pallets are in each lot.

Is there a way to do this?

Thanks,
Stacey
 
There is no way I am aware of to control the number of copies printed from within Crystal Reports.

One alternative would be to create a report that repeats the data multiple times, with one 'set' per page, so that the required number of pages are generated in the one report.

I achieved it this way:
[ol 1]
[li]Create a table (you could use a spreadsheet if you do not have the ability to create a table in the database you are using) with a single column with records numbered consecutively from 1 to the maximum number of labels you may need;[/li]
[li]Add the table to the report, but do not join it to the existing tables;[/li]
[li]Create a Group1 on the column from the new table (it needs to be the highest level group if there are other groups already in the report);[/li]
[li]Use the Section Expert so that each Group 1 is started on a new page (actual approach depends on the version of CR you are using - in CR11 set the GF1 properties to create a new page after);[/li]
[li]Create a paramater for the number of copies required;[/li]
[li]Add the following code to the Record Selection formula:[/li]
[/ol]
Code:
{Table.COUNT} <= {?Copies}
, where {Table.COUNT} is the table/spreadsheet created at step 1 above.

When you run the report, it will create multiple copies of the pallet label (1 to each page), based on the parameter value.

Hope this helps.

Cheers
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top