DhavalR
DhavalR

Reputation: 1417

Sum of columns from Tablix in textBox shows #ERROR in RDLC

I have a tablix in RDLC and a TextBox below the tablix. Now I want the sum of a particular column in TextBox. I used an expression for the sum.

The expression is as per below....

=Sum(Fields!Col.Value, "DataSource")

I am taking the sum of the records from data set. But shows me error. The typeof TextBox is number.

Below is the image of the output of the Report Viewer.

enter image description here

What is wrong? Or how to do it?

Upvotes: 0

Views: 3268

Answers (1)

Vijay Thorat
Vijay Thorat

Reputation: 98

For sum you have to convert filed to double then you can use sum. CDbl(Filed!somethingCol.Value) use this function for conversion.

Change your code to below

=Sum(CDbl(Fields!Col.Value), "DataSource")

Upvotes: 1

Related Questions