views:

179

answers:

1

alt text

this is the desired result i needed. i had populated State(RowGroup), Male(ColGroup), Year(ColGroup) and the data inside the matrix. to calculate the data count total(100), i used the feature AddTotal by right clicking it. But in this report i have used expression to calculated individual Percentage.

Expr1: to calculate the percentage i used this expression:

=Fields!count.Value/Sum(Fields!count.Value, "Gender_Group")

I have no problem in populating this percentage(25%,25%).

the problem i am right now is calculating the total percentage. (50%). i couldn't see the AddTotal option in rdlc at the Total field row.

alt text

hence i tried to add another expression at the red colored cell to find the sum

expr2:=Sum(ReportItems!Textbox1.Value)

where textbox1 is the value in the Expr1.

but i get an error:

Aggregate functions can be used only on report items contained in page headers and footers.

my desired output is finding the total percentage. any help would be appreciated.

+3  A: 

I just duplicated your report and the following code worked for the expression:

Sum(Fields!count.Value)/Sum(Fields!count.Value, "Gender_Group") 
Registered User