How to access RDLC matrix subtotal value?
-
Hi, I have a matrix on RDLC report viewer as following: C1 C2 Total Cnt % Cnt % Cnt % R1 20 30 50 R2 50 50 100 Total 70 80 150 The Subtotal values in column and row are auto-calculated by the matrix object. How can I access the subtotal value 70, 80, 150 to calculate the % values?
-
Hi, I have a matrix on RDLC report viewer as following: C1 C2 Total Cnt % Cnt % Cnt % R1 20 30 50 R2 50 50 100 Total 70 80 150 The Subtotal values in column and row are auto-calculated by the matrix object. How can I access the subtotal value 70, 80, 150 to calculate the % values?
You can use the group names in totals to calculate. You could do something like - matrixcoltotal / matrixtotal. Your expression will look something like this. =Sum(Fields!ReportField.Value,"MatrixGroup")/Sum(Fields!ReportField.Value,"dataset"). Using fields as a real example... Assuming the name of the column group is WeekStartDate, something like the following should work: =iif(iif(isnothing(Sum(Fields!RMAs.Value,"WeekStartDate")),0,Sum(Fields!RMAs.Value)/Sum(Fields!RMAs.Value,"WeekStartDate"))=0,nothing,Sum(Fields!RMAs.Value)/Sum(Fields!RMAs.Value,"WeekStartDate"))
-
You can use the group names in totals to calculate. You could do something like - matrixcoltotal / matrixtotal. Your expression will look something like this. =Sum(Fields!ReportField.Value,"MatrixGroup")/Sum(Fields!ReportField.Value,"dataset"). Using fields as a real example... Assuming the name of the column group is WeekStartDate, something like the following should work: =iif(iif(isnothing(Sum(Fields!RMAs.Value,"WeekStartDate")),0,Sum(Fields!RMAs.Value)/Sum(Fields!RMAs.Value,"WeekStartDate"))=0,nothing,Sum(Fields!RMAs.Value)/Sum(Fields!RMAs.Value,"WeekStartDate"))