0

I have a table like :

ColumnA ColumnB
8.75 J
5.05 T
6.1 T
8.5 J

I want to sum ColumnA data where ColumnB = J and show it in one of the RDLC textboxes.

What I should write in the Expression Field?

Andrew Morton
  • 24,203
  • 9
  • 60
  • 84
  • At first glance, [How to sum a field based on a condition in another field in RDLC report?](https://stackoverflow.com/questions/29642065/how-to-sum-a-field-based-on-a-condition-in-another-field-in-rdlc-report) appears to contain enough information for you to work it out. – Andrew Morton Sep 10 '22 at 12:22

1 Answers1

0

You can use the following expression.

=Sum(IIf(Fields!ColumnB.Value, 1) = "J", CDbl(Fields!ColumnA.Value), 0)

Use IIF( expr truepart,falsepart) to determine if the value is J, and Sum() to calculate the sum.

Jiachen Li-MSFT
  • 320
  • 2
  • 8
  • 19
  • thanks for helping me , I get this error : the Value expression for the textrun ‘Textbox105.Paragraphs[0].TextRuns[0]’ 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. – Michel Chizhu Sep 18 '22 at 07:45
  • Please make sure using "yourdatasetname" to replace 1 in the expression. – Jiachen Li-MSFT Sep 19 '22 at 02:17