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!

Printing multiple copies of a report

Status
Not open for further replies.

Slimsteve

Technical User
Jun 10, 2003
67
GB
Hi,

Just curious, does anyone know if you can use a field in the report to create mulitple pages of printouts.

Let me explain, I am writing a report which searchs our database for a product code and qty. This is a label report and for each product I need to product a label.

For example:
If the record returned is "PRODUCTCODE,QTY = 1" then I need 1 label.
If the record returned is "PRODUCTCODE,QTY = 3" then I need 3 labels.
etc

I know I could change the number of copies during print, but could the report do this instead ????

Slim
 
Yep - this can be done - search the archives and you'll see this topic has been covered before (it's even in the knowledgebase on Crystal's website).

In a nutshell, you create a new table in your database with records that contain a single numeric field, then populate the table with sequentially number records (1,2,3,4,5,6,7...) up to the maximum number of labels you expect to print.

Link your PRODUCTCODE,QTY field to the new table using a 'less than or equal' join. If the PRODUCTCODE,QTY is 6, then that will return 1,2,3,4,5,6 records from the new table, and you'll get six labels.

If your database/connection does not support the 'less than or equal' join type, then you can create your table to have records like 1,2,2,3,3,3,4,4,4,4... and the same logic will work with an equal join.

Peter Shirley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top