Solved

Print a number of pages using a variable in Crystal Reports

Posted on 2013-05-22
13
514 Views
Last Modified: 2013-09-02
The user will know how many copies they will need of the report.  The issue is that they are not exact copies.  Only the page footer is different.  For example if there are 5 pages they should have on it in the footer "Page 1 of 5" through "Page 5 of 5".   How can I use a variable to get the report to print that many pages with the correct footer?

Thank you.
0
Comment
Question by:MrWeen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 5
13 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 39187462
There is the Page N of M object you can use.

How are you printing multiple copies?

mlmcc
0
 

Author Comment

by:MrWeen
ID: 39188923
That is the question.  The user will know the amount needed.  So if for example the user wants 5 copies they will enter in 5 for a variable.  How do I get that variable to print the number of pages that I want?

Thank you.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39189089
SO the pages is not the number of pages in the report but the number of copies?

How are you controlling the number of copies?

mlmcc
0
Enroll in June's Course of the Month

June’s Course of the Month is now available! Experts Exchange’s Premium Members, Team Accounts, and Qualified Experts have access to a complimentary course each month as part of their membership—an extra way to sharpen your skills and increase training.

 

Author Comment

by:MrWeen
ID: 39193069
Yes.  It will always only be one page.  The # of copies of it is what I want to control and that each copy will see what # of how many copies it is.  E.G.  1 of 10, 2 of 10, 3 of 10 etc. for ten copies.
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39193088
How are you getting Crystal to print the copies?

If you are doing it through the print control you can't do it.

mlmcc
0
 

Author Comment

by:MrWeen
ID: 39205715
Sorry for the late response.  I don't think I am explaining what I want properly.  When I say copies I mean the number of pages that will print.  So really I want the variable to print the detail section x amount of times once on each page.  Each page will be exactly the same except the footer which will say page 1 of x.  Does this make sense?
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 39206075
I fully understand what you want.

I know you can print multiple copies through the print control but you really need Crystal to specify the number of copies.

How many copies might be specified?
1, 5, 10, 1000?

mlmcc
0
 

Author Comment

by:MrWeen
ID: 39206417
There would never be more than 20 needed.
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 39206433
Does the report have a subreport?
If not you could create a master container report that has 20 report header sections each with its own copy of the report.
Each report could be modified to show the appropriate footer. or use the N of M page option.

You could then use conditional suppression to suppress the "extra" copies

PageNumber >= {?NumberofCopies}

mlmcc
0
 

Author Comment

by:MrWeen
ID: 39216724
I was hoping for something a little cleaner and simpler.  Is there no way to make the detail section loop depending on the variable?
0
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39216770
You could create a table in the database with the values 1-100

You then select from it based on the value  {?NumCopies} >= {COlumnValue}

The cross join will create N records allowing you to print that many copies.


mlmcc
0

Featured Post

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

689 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question