Print Page | Close Window

Problem in Subreport Totaling

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=5910
Printed Date: 04 May 2025 at 8:30am


Topic: Problem in Subreport Totaling
Posted By: Vikas Pagare
Subject: Problem in Subreport Totaling
Date Posted: 27 Mar 2009 at 2:05am
Hi,
 
I have Created a Report with two subreports placed in same detail section.
 
Both the subreports are having more or less records with respect to other.
 
I have declared two shared variable on header part of main report and i
 
am using those variables in two subreports respctively to sum up the
 
amount in subreport.
 
In the footer part of the main report the value of those shared variable not coming correct.
 
--Vikas



Replies:
Posted By: jkwrpc
Date Posted: 30 Mar 2009 at 12:03pm
You might trying placing the subreports in different detail sections, assuming your design will let you. Unless you need the shared variables before the subreports run.,I would not put them in the header. I would put them  in the subreports and then pass the value to the footer by placing the shared variable at that location. 
 
This may help with problems caused by the way CR generates reports in the various passes it makes.
 
The obvious other points are to use the WhilePrintingRecords in the formulas and to make sure you have them variables reseting if there are multi page reports.
 
Hope something here will be helpful or get you to a right solution.
 
Regards,
 
John W.
http://www.CustomReportWriters.net - www.CustomReportWriters.net


Posted By: Vikas Pagare
Date Posted: 31 Mar 2009 at 7:55am

Hi John

 

I have tried both the things you have motioned but still its not working.

 

Actually, i have placed my both the sub-reports in one detail section (one at right side and one at left side of the section) and both are running simultaneously.

 

I have two shared variables DB and CR which are getting added in both subreports respectively, the value of one of the shared variable not coming correct, since both the reports are having more and less records.

 

I think it might be the functional problem of Crystal Report.

 

Please post your opinion or suggestion on it.




Print Page | Close Window