Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I assign result of expression to a variable in SSRS 2008

Can I assign result of expression into a variable and use it in another textbox expression? instead of repeat the expression 1 in the expression 2

as sample I want to show how many records for some condition in a column A, and show the percentage based on the total in column B

Thankssss

like image 913
user1004299 Avatar asked Dec 16 '25 15:12

user1004299


1 Answers

You can use the ReportItem class to refer to a specific item in the report:

In column B use the following expression:

=ReportItems!TextboxColumnA.Value/ReportItems!TextboxColumnATotal.Value

where TextboxColumnA would be your first column and TextboxColumnATotal would be the total for Column A.

like image 55
xm1994 Avatar answered Dec 19 '25 07:12

xm1994