In a cell I have the following:
=iif(Parameters!VOLREV.Value="Volume",sum(math.Round(Fields!ADMINSRV_SLS.Value)),sum(math.Round(Fields!ADMINSRV_FEES.Value)))
Depending on parameter I am either rounding the sum of sales or the sum of fees. This works beautifully. Problem is when I copy this to the total row it is not the total of the column. They are slightly off. I even tried naming the cell and then creating a calculated field in the total line to make sure that I am adding the values of that cell. =sum(ReportItems!MyNamedCell.value) But this crashes VS everytime and it has to restart. Does anyone have a suggestion please.
In the total cell, is the expression rounding and then summing the values, like in the data cell? If so, this should produce identical results. How off are the values?Also, the other issue, regarding the use of the expression, =sum(ReportItems!MyNamedCell.Value), should just cause a publishing error. ReportItems can not be used inside aggregates unless the aggregate is used in the page header or footer. I'm not sure why it is crashing VS.|||I am wondering if it is summing and then rounding because the totals are slightly off of what the total of the columns should be.|||
Found the answer. For whatever reason in my grouping lines that show my detail this works:
=iif(Parameters!VOLREV.Value="Volume",math.Round(sum(Fields!ADMINSRV_SLS.Value)),math.Round(sum(Fields!ADMINSRV_FEES.Value)))
But in my total line I had to reverse the logic to this.
=iif(Parameters!VOLREV.Value="Volume",sum(math.Round(Fields!ADMINSRV_SLS.Value)),sum(math.Round(Fields!ADMINSRV_FEES.Value)))
No comments:
Post a Comment