Cannot sum the right value from subreport

Stimulsoft Reports.PHP discussion
Super Bread
Posts: 36
Joined: Mon Aug 08, 2011 12:51 am

Cannot sum the right value from subreport

Post 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
Attachments
Question_Subreport_20121207.docx
(164.19 KiB) Downloaded 324 times
Super Bread
Posts: 36
Joined: Mon Aug 08, 2011 12:51 am

Re: Cannot sum the right value from subreport

Post by Super Bread »

The report file is attached for your reference, thanks.
Attachments
LoanSheetReport_Problem.mrt
(47.49 KiB) Downloaded 296 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cannot sum the right value from subreport

Post 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.
Super Bread
Posts: 36
Joined: Mon Aug 08, 2011 12:51 am

Re: Cannot sum the right value from subreport

Post 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.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cannot sum the right value from subreport

Post by HighAley »

Hello.

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

Thank you.
Super Bread
Posts: 36
Joined: Mon Aug 08, 2011 12:51 am

Re: Cannot sum the right value from subreport

Post by Super Bread »

The sample data is attached for your analysis, thanks.
Attachments
lms.zip
(9.26 KiB) Downloaded 279 times
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cannot sum the right value from subreport

Post by HighAley »

Hello.

We need time to prepare an answer for you.

Thank you.
Super Bread
Posts: 36
Joined: Mon Aug 08, 2011 12:51 am

Re: Cannot sum the right value from subreport

Post by Super Bread »

Hello,

May I ask any update?

Thanks.
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: Cannot sum the right value from subreport

Post by HighAley »

Hello.

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

Thank you.
Super Bread
Posts: 36
Joined: Mon Aug 08, 2011 12:51 am

Re: Cannot sum the right value from subreport

Post by Super Bread »

Hello,

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