Dream Viewer
Dream Viewer

Reputation: 43

Multiple Crystal Report to be printed on same report

I have a crystal report that takes only about 1/3rd of the report space. I have field read from the database which is an integer value. I wish to print this report number of times as read from the database on the same page. Any idea on how this can be achieved?

I can only use crystal report for achieving this.

Thanks in advance.

Upvotes: 1

Views: 4506

Answers (3)

Lan
Lan

Reputation: 1361

In this case you can create a table with the maximum number of prints you will ever use. For example if you think you might need to print the report 100 times your table should contain records from 1 to 100. So lets assume this is the case- create a table , name it Copies and add a field CopyNo. Create a 100 records and set CopyNo from 1 to 100. Create the a main report based on Copies table - the record selection formula will be something like : Copies.CopyNo<=@NumberOfCopies

@NumberOfCopies is a parameter , which you can set in order to control the printed copies. Create your actual report as a subreport and place it in the details section of the main report. When you run the report it will ask you for the number of copies and when you insert it, will print the same subreport as many times as the number you provide.

Upvotes: 0

B-Rell
B-Rell

Reputation: 636

Lan is correct, build another report and add your current report as a subreport.

Here's the trick:

  1. On your main report, have it make a list of all of the items that you'd like to run the sub-report on.
  2. On your sub-report, add a parameter called "itemNumber" or something like that. Then change your Subreport Links so the new "itemNumber" parameter is linked to the item on your top level report.
  3. Now hide the field on the main report but leave the subreport visible.!

enter image description here

This should make your report run for all items at one time.

Upvotes: 0

Lan
Lan

Reputation: 1361

You can create another report and add your current report as a subreport multiple times

Upvotes: 0

Related Questions