Page 1 of 2

Cannot sum the right value from subreport

Posted: Fri Dec 07, 2012 3:52 am
by Super Bread
Hello,

This report calls the SubReport2 and want to return the sum of fields from SubReport2 to MainPage but there are 2 problems for sum of two fields. Please read the attached file and the following for the details.

1. It shows the Text11 "payment1.sumpaidamt1" in DataBand3 of Page_SubReport2. I want to show the sum of this field.
The Text31 "{Sum(payment1.newcontractid==loaninfo.contractid?payment1.sumpaidamt1:0)}" is shown in the GroupFooterBand1 of Page1.
The problem is: there are 3 records in SubReport2, it shows sum of these 3 records, but it only sum the 3rd records.

2. The Text22 "{sumSettle=SumIf(DataBand1,payment1.sumpaidamt1,payment1.newcontractid==loaninfo.contractid)}",
I assign toe variable "sumSettle". Then, the Text32 "{Sum(DataBand1,sumSettle)}" should be shown the sum of Text22.
The problem is: there are 3 records, it should be sumed of field Text32 but it sum 3 times of the 3rd records.

Thanks,
Super Bread

Re: Cannot sum the right value from subreport

Posted: Fri Dec 07, 2012 3:55 am
by Super Bread
The report file is attached for your reference, thanks.

Re: Cannot sum the right value from subreport

Posted: Fri Dec 07, 2012 12:59 pm
by HighAley
Hello.

You didn't set the Data Source for processing.
Please, try to use Sum(DataBand3, payment1.newcontractid==loaninfo.contractid?payment1.sumpaidamt1:0)

Thank you.

Re: Cannot sum the right value from subreport

Posted: Fri Dec 07, 2012 5:05 pm
by Super Bread
Hello,

I try to set Sum(DataBand3, payment1.newcontractid==loaninfo.contractid?payment1.sumpaidamt1:0) in Text31. But the result is the same as before. Please help.

Thanks.

Re: Cannot sum the right value from subreport

Posted: Mon Dec 10, 2012 12:10 pm
by HighAley
Hello.

Please, send us a sample data for your report for analysis.

Thank you.

Re: Cannot sum the right value from subreport

Posted: Tue Dec 11, 2012 4:30 pm
by Super Bread
The sample data is attached for your analysis, thanks.

Re: Cannot sum the right value from subreport

Posted: Wed Dec 12, 2012 11:41 am
by HighAley
Hello.

We need time to prepare an answer for you.

Thank you.

Re: Cannot sum the right value from subreport

Posted: Mon Dec 17, 2012 7:17 am
by Super Bread
Hello,

May I ask any update?

Thanks.

Re: Cannot sum the right value from subreport

Posted: Mon Dec 17, 2012 1:15 pm
by HighAley
Hello.

We are still working on our problem.
We will let you know about the results.

Thank you.

Re: Cannot sum the right value from subreport

Posted: Fri Dec 28, 2012 8:00 am
by Super Bread
Hello,

I'm looking forward to your reply. Many thanks.