Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Passing data between Main Report and Sub Report

Posted on 2008-10-09
4
Medium Priority
?
1,108 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 2000 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

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…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
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…

722 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