Search code examples
c#asp.netreporting-servicesreportrdlc

How to calculate rdlc tablix rows sum and rows count in textboxes


I have tablix named tablix2 and have 3 columns ,I want to calculate rows sum and count in 2 textboxes out of the tablix scope, I try this expression.

=RowNumber("Tablix2")

And

=CountRows("Tablix2")

And

=Count(Fields!ID.Value,"Tablix2")

Its always show me this error message:

The Value expression for the text box ‘Textbox7’ has a scope parameter that is not valid for an aggregate function. The scope parameter must be set to a string constant that is equal to either the name of a containing group, the name of a containing data region, or the name of a dataset.


Solution

  • You need to use a scope name which is valid. If you're outside of the tablix then you should use dataset scope probably.

    Try something like

    =Count(Fields!ID.Value,"DatasetName") or

    =Sum(Fields!ID.Value,"DatasetName")