Running Value and Scope

1 Answer 39 Views
DataSource SQL Report Designer (standalone) SubReport
Kristine
Top achievements
Rank 1
Kristine asked on 19 Jul 2021, 08:46 PM

Hello,

I am using Telerik Report Designer. I have a subreport called SubConfStatementDtls that has its own datasource. My columns are ID, Entry Date, Amount, Tax, and Running Total. For the Running Total column, I am adding the Amount and Tax columns. When I use the RunningValue function in the Running Total column, it does not restart for each grouping. My items are grouped by Fields.TransID. 

The formula I have in the RunningTotal column is:

=Format("{0:C}", RunningValue('SubconfStatementSummary', Sum(Fields.stmtBasicAmt + Fields.TaxAmount)))

SubconfStatementSummary is the Name within the Properties section of this subreport. 

The screenshots below are found in the same report when I run it. I was hoping that when I got to a new Item (in this example, Conference Housekeeping) that the Running Total would not carry over from the item before it (Conference Accommodation). 

 

 

What am I missing?

1 Answer, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 22 Jul 2021, 12:12 PM

Hello Kristine,

Thank you for the provided information.

One thing that is not clear to me is whether the SubconfStatementSummary is the name of the SubReport item or is the name of the group?

In order for the value to reset to 0 for each group instance, you need to specify the group's name in the function instead of the name of the SubReport. When the scope is set to a group, the running value will reset when the group expression changes.

For more information, please see the Data Functions article.

If you will need further help, please provide the report, alongside some sample data and we will have a look at it.

Regards,
Dimitar
Progress Telerik

Brand new Telerik Reporting course in Virtual Classroom - the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products. Check it out at https://learn.telerik.com/.
Kristine
Top achievements
Rank 1
commented on 22 Jul 2021, 03:04 PM

Hi Dimitar. Thank you for your response! SubconStatementSummary is the name of the SubReport.

I used =Format("{0:C}", RunningValue('group', Sum(Fields.stmtBasicAmt + Fields.TaxAmount))) and it worked as expected! The Running Total column now resets at 0 for each group I have in my SubReport.

Thank you!
Tags
DataSource SQL Report Designer (standalone) SubReport
Asked by
Kristine
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Share this question
or