Solved

How do you create pages with different information in Crystal Reports?

Posted on 2014-09-19
6
1,925 Views
Last Modified: 2014-10-01
I was just informed that the report should print the data as this

  Page 1,Page 1; Page 2, Page 2.
 Two page 1's, but with small changes in information.

 Same information as stated in an earlier question that I marked as answered :
 Most of the information will be the same in the detail section, with exception of one field. The page header will contain different text
0
Comment
Question by:trilian
[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
  • 2
  • 2
  • 2
6 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 40333228
As I commented in the original email.

You will need a subreport for each "copy" of the report you want to print.

There can only be 1 detail section in a report (1 per record) and a record can only appear in one detail section.

If the report is providing information on 1 record from the database or a limited number of records, it might be possible to use arrays to gather the data then through some tricks with sections generate the 4 copies of the report.  I think the complexity of that especially if you need to change something 6 weeks (months) from now would far out way the issues of maintaining multiple subreports.

mlmcc
0
 
LVL 18

Expert Comment

by:vasto
ID: 40333360
What are you going to do with the result ? Print it, export it to PDF ?
0
 
LVL 1

Author Comment

by:trilian
ID: 40336536
Print
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 18

Expert Comment

by:vasto
ID: 40336680
Check this sample video: https://www.youtube.com/watch?v=aEnEQhOsSvU 
It is showing how to use one report and a parameter to print an invoice and mark the copies as Original, Copy1, Copy2. Then a job is created and 3 copies of the same report, but with different parameters are added. When the job is started it will export or print 3 different copies. Seems the same scenario as yours. Let me know if you need something different. The sample is going further showing how to email the generated file, which you don't need. Ignore this part.
The software used in this video is available for free as a Community edition from this page : http://www.r-tag.com/Pages/CommunityEdition.aspx
0
 
LVL 1

Author Comment

by:trilian
ID: 40354757
This works great: You will probably need to create a subreport which you should put in the report footer if you want it to be page 2.  You will have to use the report header and footer in the subreport to simulate the page headers.

How would I do the following:
 You will have to suppress the main report page header when in the subreport
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 40355031
Create a second report footer
Right click the report footer in the left margin
Click INSERT SECTIION BELOW
Drag the new section up
Click RFb in the left margin and drag it above RFa
RFa and RFb change places and RFa is empty

Add a formula to the report header

WhilePrintingRecords;
Global BooleanVar SuppressPageHeader;
SuppressPageHeader := False;
""

Open in new window


Add a formula to RFa
WhilePrintingRecords;
Global BooleanVar SuppressPageHeader;
SuppressPageHeader := True;
""

Open in new window


Right click the page header in the left margin
Click SECTION EXPERT
Click the formula button to the right of SUPPRESS
Enter this as the formula
WhilePrintingRecords;
Global BooleanVar SuppressPageHeader;
SuppressPageHeader

Open in new window

Click OK
In the SECTION EXPERT click the Page Footer
Click the formula button to the right of SUPPRESS
Enter this as the formula
WhilePrintingRecords;
Global BooleanVar SuppressPageHeader;
SuppressPageHeader

Open in new window

Click OK

mlmcc
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

738 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