crystal reports 2011 Sub reports / loops

Posted on 2014-03-20
Last Modified: 2014-11-27
Crystal report 2011
CR Developer
Version TRM

I have a report that has a main report with a page header defined. The main report is used to select the input parameters.  The main report calls 6 sub reports; each sub report is defined in its own separate report footer.  Three of the sub reports are cross tab reports.   The main report does not use the detail section.

The user selects a set of parameter for the report. These parameters are displayed as part of the page header.

The user now wants to be able to do a select of “ALL” on one of the input parameters.  The idea is to generate a concatenated report.  So the header and six sub reports would execute for the first item in the list, the next item and so on. The list can be controlled by a data base select, so the user only selects the ALL item.

I have done this before by converting the main report to a sub report and then calling the subreport  in  a group by detail section detailed section.  But in that case the main report did not have call to a sub report.

I know that subreports cannot call subreports (if it could it would simplify this problem).

Any idea on how to do this with such a complicated report?
Question by:fpkeegan
  • 4
  • 2
LVL 18

Expert Comment

ID: 39943618
I don't think that this is possible because you have subreports. If you can place the subreports in the details section and use groups to handle the printing then obviously it is a matter of providing the list of the parameters.

Another option is to use a 3rd party tool. The process you are describing is known as "data driven" publication. You can provide a recordset and one or more reports will be executed against each record in the recordset. So instead of changing the report you can provide a query , which will retrieve all possible records and then run the report in the normal way for each of the values returned by the query. You can check R-Tag Report Manager ( The only think I am not sure it can do is to combine all generated files at the end, because they will be related to different records. But this might be possible too, you need to ask the tech support. They have a free viewer , which is able to handle this scenario. Double check if the license is free because I noticed some recent changes in licensing.

Author Comment

ID: 39943662
I work for a large Corporation , this limits the use of any other software products.  It would take more than a year to get a new product in here to just test.  This place is really locked down.  We do not even have admin rights on our own PCs. And USBs are outlawed.  

The soultion needs to be a crystal reports solution.
LVL 18

Expert Comment

ID: 39943722
The other option is to get the list of all items in the main report, put your subreports in the details section, group by item id ( or whatever unique field you have). if your query returns just one record the report will work as now. If the query returns multiple records  you will see result similar to resulls from data driven reports. You can use Group Header / Footer to print the data which is printed on report header / footer in your current report.
Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

LVL 22

Expert Comment

by:Ido Millet
ID: 39943807
Why not simply group the report on whatever that parameter controls.  This would allow you to place the subreports in Group Footers instead of Report Footers.  When the user selects a regular value in that parameter, only one Group would be selected.  

When the user selects ALL, the record selection would bring in all Group values and you would get the desired result.

Author Comment

ID: 39950702
The data cannot go in to the detailed section. The report has a report footer section  that is not a sub report . The footer is for a cross tab report. The cross tab report must be in the footer section because cross tabs that are in sub reports will not expand horizontally.

I will try the group footer.

Author Comment

ID: 39957448
Getting closer.
There is  one group header , that contains the page header. It has the "Change Group options" , with the "Repeat group header on each page" checked. The data in the group header changes on each loop.
The details section is hidden,
There are 6 separate group footers , each one contains a separate sub report or a crosstab report.
The data in each section prints correctly. The problem is that the  group Page header only prints on the first page of each loop. Not on each page that makes up the group footer..

Accepted Solution

fpkeegan earned 0 total points
ID: 39957548
The group footer header problem is a known problem. This is the work around.

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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. …
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

815 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now