0
votes

I have table name SeviceFeeSummary with decimal field name SeviceFeeTotal (data example 3123.4512)

On SSRS report, I create text box with expression

=Sum(Fields!servicefeetotal.Value, "SeviceFeeSummary")

and

=First(Fields!servicefeetotal.Value, "SeviceFeeSummary")

I got error return when run report. Please help to see what went wrong with these expression. Thank you so much.

2
Is the error really expression related? Without posting the actual exception we have no way of knowing. - Ross Bush
I mean the report run ok, but the textbox with expression got Error - ngoc
Neither expression above will get error. - ngoc
Do the format specifiiers match th datatypes you are binding? Does the text box have a value in the format field? - Ross Bush
I just use data from table. The text box just have expression. nothing else - ngoc

2 Answers

1
votes

You cant reference to a table or tablix name (SeviceFeeSummary) in your SSRS expression. The scope is just for dataset names or group names:

=Sum(Fields!YourField.Value, "DatasetName")
=Sum(Fields!YourField.Value, "GroupingName")

And try using a tablix and not a textbox.

0
votes

It appears you are using a Case other than what the field bound to the dataset is using. Also, remove the SUM() expression to rule out datatype mismatch.

Try this-->

First(Fields!ServiceFeeTotal.Value, "SeviceFeeSummary")