Solved

Passing data between Main Report and Sub Report

Posted on 2008-10-09
4
1,099 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Problem Statement In an SAP BI BO Integration project when a BO universe is built on a BEx query, there can be an issue of unit & formatted value objects not getting generated in a BO universe for some key figures. This results in an issue whereb…
How to increase the row limit in Jasper Server.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

777 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