Greeting i have 3 textbox value in footer of my report i want make total (sum) for tow of them so when i try to make total with them give me this error
The Value expression for the textrun ‘.Paragraphs[0].TextRuns[0]’ refers to more than one report item. An expression in a page header or footer can refer to only one report item.
i used those code for sum but none of them working
=ReportItems!Textbox62.Value+ReportItems!Textbox61.Value
and this
=CDec(ReportItems!Textbox62.Value)+CDec(ReportItems!Textbox61.Value)
is there any idea fro solve this problem
That depends how your textbox expressions are. Lets assume you have one dataset (Dataset1
) then you have
'Textbox1
=Sum(Fields!SomeNumericValue.Value)
'Textbox2
=Avg(Fields!SomeOtherNumericValue.Value)
Then this will work for your other textbox:
'Textbox3
=ReportItems!Textbox1.Value + ReportItems!Textbox2.Value
=Sum(Fields!SomeNumericValue.Value) + Avg(Fields!SomeOtherNumericValue.Value)
If you have two datasets (Dataset1
and Dataset2
) this will work:
'Textbox1
=Sum(Fields!NumericValue1.Value, "Dataset1")
'Textbox2
=Avg(Fields!NumericValue2.Value, "Dataset2")
'Textbox2
=Sum(Fields!NumericValue1.Value, "Dataset1") + Avg(Fields!NumericValue2.Value, "Dataset2")