Solved

Passing data between Main Report and Sub Report

Posted on 2008-10-09
4
1,098 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
4 Comments
 
LVL 100

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 I am going to show you how to back up and restore Office 365 mailboxes using CodeTwo Backup for Office 365. Learn more about the tool used in this video here: http://www.codetwo.com/backup-for-office-365/ (http://www.codetwo.com/ba…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

25 Experts available now in Live!

Get 1:1 Help Now