Print Page | Close Window

Multiple pages based on parameter

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=19915
Printed Date: 05 May 2024 at 8:31am


Topic: Multiple pages based on parameter
Posted By: rusmanicai
Subject: Multiple pages based on parameter
Date Posted: 20 Aug 2013 at 5:07am
Hi,
I need to create a shipping label that shows box 1 of n along with other static and dynamic info that pulls from the order.
I created a parameter called "No of Boxes". I put my shipping label info in the Page Header and then I am using "Page Number" +text "of" + "No of Boxes", to account for what label goes to which box.
I currently don't have anything in my details section.
I did go to section expert, Details, Paging, "New Page Before" and typed "{?No of Boxes}>1 hoping that the report would create a new page if I have multiple boxes :)
I realize now that I probable need some kind of counter while printing records, but have no idea how to do that, or what section to declare it.
Please help. Thank you.



Replies:
Posted By: hilfy
Date Posted: 21 Aug 2013 at 11:41am

Is there a maximum number of boxes?  There are only two ways that I know of to do this:

 
1.  Have a query that returns a row of label data for each box.  Put the label in the details and suppress all other sections.  Turn on "New Page Before" on the details with "PageNumber > 1" in the New Page Before formula so that you don't get a new page on the first page.
 
2.  Create a set of details sections - one for each possible lable (this only works if you have a reasonable maximum number of lables!)  Copy the label format into each detail section.  Selectively suppress the sections based on the number of boxes in the parameter.  For example, for the second label, section you would put something like this in the suppress formula:
 
{?NoOfBoxes} < 2
 
For the third:
 
{?NoOfBoxes} < 3
 
etc.
You would also turn on "New Page Before" for each detail section except the first one.  A new page won't be generated for a section that is suppressed.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics


Posted By: rusmanicai
Date Posted: 22 Aug 2013 at 3:38am
Hi Dell,
I tried version 1. I put everything in my details section and turned New Page Before on, with the formula.
I am not getting a new page though, not even a blank page.
I am not sure how to create a query that will return a new row with the label for every box.
Can you please help me?


Posted By: Kdieder
Date Posted: 13 Sep 2013 at 8:23am
I have almost the same question.
It would be a count up function.
Could a formula be incorporated with how many copies you print?
...like a formula that would number the copies?
In that case if you had a large amount, it would be manageable.


Posted By: hilfy
Date Posted: 13 Sep 2013 at 8:58am
You would still have to have a separate section or subreport for each copy.  Crystal won't print copies of pages based on a parameter input to the report.
 
-Dell


-------------
Proviti, Data & Analytics Practice
http://www.protiviti.com/US-en/data-management-advanced-analytics - www.protiviti.com/US-en/data-management-advanced-analytics



Print Page | Close Window