Print Page | Close Window

Sub Report + Main Report Problems URGENT

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Report Design
Forum Discription: The best way to design a report and problems you have encountered
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2384
Printed Date: 04 May 2025 at 6:26pm


Topic: Sub Report + Main Report Problems URGENT
Posted By: Maignanamurthy
Subject: Sub Report + Main Report Problems URGENT
Date Posted: 20 Feb 2008 at 6:46am

Shocked
Hi Experts ,
I have one main report and two sub reports.
i had created One Group section in main report and i call the subreport1 from
group header section and subreport2 from group footer section.
The main report run successfully. sometimes it shows more than one pages
based on sql database records.

The Problem is,

The Two Sub reports having separate running totals. I had shared that parameters,
 then i called those from main report.
Now i want to add(addition) the sub report running totals, and show it as a
pagewise total in main report.

i add the two shared variables(subreport running totals) with the same name in main report
as formula named as netotal.
and paste this nettotal formula in main report page footer.

when the main report preview can contain multiple pages, the nettotal shows
the total amount in the last page only, but i want the pagewise total,

how can i solve this problem.



-------------
Awaiting Your Valuble Reply
With Thanks
Maignanamurthy.A



Replies:
Posted By: BrianBischof
Date Posted: 21 Feb 2008 at 6:42pm
I'm confused when you say that you have two subreport totals with the same name. If this is true, then one will overwrite the other and lose its value. If you give them different names, then the values will stay separated and the main report can add them together in it's subtotal. Another problem you could be having is that you might be initializing the variable to zero when you declare it. If so, then it will wipe out any previous value it had from the last time the subreport ran. Check on these things to see if they help.

-------------
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>


Posted By: Maignanamurthy
Date Posted: 05 Mar 2008 at 10:35pm
Hi Friend,
 
Now i am giving the different names for two sub reports total
and also initialize the both variables as Zero.
 
i add the two sub reports total in main report page footer.
but it doesnot show the page wise total,
it returns the total value in the last page only.
But i want the Page wise total
if its Possible?
Its Urgent...
Advance thanks


-------------
Awaiting Your Valuble Reply
With Thanks
Maignanamurthy.A


Posted By: anandsmailbox
Date Posted: 11 Mar 2008 at 2:47am
Hi,
 
I hope this would work out..
 
1.create a Group header with the below formula on your 2nd sub-report (which was placed in the page footer of the main report) .
----------------
whilereadingrecords;
""
-----------------
 
2. Create a new section for the Group header and place the running total field in it.
 
3. In the Group section , select the 'Show group header on every page'
option.
 
 


Posted By: OnAWingNAPrayer
Date Posted: 24 Mar 2008 at 7:50pm
Hello! I am new to CR and have a problem already. I am using a subreport to obtain a subset (like using sub query) of data that returns a date. The main report is responsible for conditions on calculating an amount of time that has passed for each record (like a query) it brings in. This needs to return a total amount of time PER record. If I only specify via the select expert one record ID, all is fine. However, when several records are processed, the totals are printed as one single number; I suppose it would be the last record's total. I need this to report per group of records specified in the group expert.
 
How do I get the report to post totals obtained from the main report per record and how do I get a final average time (in hours, by  the way) of all records?


-------------
Thank You!


Posted By: me_kenny
Date Posted: 04 Dec 2009 at 5:06am
Has anyone have the solution to the problem mentioned by member_profile.asp?PF=3741&FID=8 - Maignanamurthy ? Mind sharing as im also stuck with the same problem.



Print Page | Close Window