?
Solved

crystal reports 2011 Sub reports / loops

Posted on 2014-03-20
9
Medium Priority
?
476 Views
Last Modified: 2014-11-27
Crystal report 2011
CR Developer
Version 14.0.4.738 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?
0
Comment
Question by:fpkeegan
[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
  • 4
  • 2
9 Comments
 
LVL 18

Expert Comment

by:vasto
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 (www.r-tag.com). 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.
0
 

Author Comment

by:fpkeegan
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.
0
 
LVL 18

Expert Comment

by:vasto
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.
0
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 23

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.
0
 

Author Comment

by:fpkeegan
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.
0
 

Author Comment

by:fpkeegan
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..
0
 

Accepted Solution

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

http://scn.sap.com/thread/2090303
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

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…
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…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

771 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