Solved

Passing data between Main Report and Sub Report

Posted on 2008-10-09
4
1,103 Views
Last Modified: 2013-11-15
I have a report with the following layout:

Details a       Field from SQL Command
Details b      Field from SQL Command
Details c      Field from SQL Command
Details d      Field from SQL Command
Details e      SubReport A

Report Footer b      SubReport B

How do I add the total number of items in SubReport B + the total number of records displayed in Details a-d and display that value in the Page Footer?
0
Comment
Question by:Ray Turner
[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 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 total points
ID: 22679073
Does each record have a field in details A-D?

In the main report headeer add a formula

WhilePrintingRecords;
Shared NumberVar SubBRecordCount;

In the subreport B
WhilePrintingRecords;
Shared NumberVar SubBRecordCount;
SubBRecordCount := Count({SomeDatabaseField});
''

In the main report footer
WhilePrintingRecords;
Shared NumberVar SubBRecordCount;
SubBRecordCount + Count(SomeFieldinMain}) * 4

If there may be nulls in the main report database fields then

WhilePrintingRecords;
Shared NumberVar SubBRecordCount;
SubBRecordCount + Count(FieldForDetailA}) + Count(FieldForDetailB}) + Count(FieldForDetailC}) + Count(FieldForDetailD})

mlmcc
0
 

Author Closing Comment

by:Ray Turner
ID: 31504670
Thanks!!!
0
 

Expert Comment

by:angel7170
ID: 24314001
Hello,

Please advice, how can I Hide/Suppress the subreport and do a count of records from the subreport to be passed into main report?
Simply I need the count and not the Details.  Thank you so much
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
I recently went through setting up a JasperReports Server using the AWS EC2 instance, and this article will cover some basic administration tasks I had to perform.
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…

615 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