April 20, 2012 at 11:36 pm
I have an SSRS report with several computation.
I have done already the dataset and I already have the ssrs report template with corresponding fields using dataset.lateron the users wanted to have a computation on the report. My question is how to do this computation in SSRS. Do I need to make variable in expression? Need your input guys.
resultset:
ItemID—1—2—-3--4---TOTAL1 --A1—A2—A3—A4—B1—B2—B3—B4—TOTAL2
11111--9-6--4--5-----24------5-3--2---2-4--3--2--3--24
These are the requirements.:
1.The number (1) column is the total of A1 and B1
2.The number(2) column is the total of A2 and B2
3.(3) column is the total of A3 and B3
4.(4) column is the total of A4 and B4
5.TOTAL1 is the total summary of column 1 to 4
6.TOTAL2 is the total summary of A1 up to B4
I tried this in my expression
Do i need this to place in variable?
for column 1
=Sum(Field!A1.Value)+Sum(Field!B1.Value) up to D1
for column 2
=Sum(Field!A2.Value)+Sum(Field!B2.Value) up to D2
and so on...
For the TOTAL1 ??
=Sum(Field!1.Value)+Sum(Field!2.Value)+Sum(Field!3.Value)+Sum(Field!4.Value)
thank you in advance..
jov
April 21, 2012 at 6:39 am
hmm, whether your calculations work or not depends on the Groupings you have setup in that SSRS report, and exactly on what level of the grouping are you adding these expressions.
I wouldn't recommend adding variables to hold these values, if anything I would push back any calculations back to the SQL Query/Stored Procedure that you are grabbing data from.
Do you have a Total Row in your SSRS report?, the calculations you are trying to perform look like total aggregates, which means logically they would need to sit on a Total row rather than a Details row in order for the "SUM" aggregate function to work properly.
its really difficult to say without having a look at your SSRS report structure itself, but you should be able to use expressions to perform the calculation you are after, its just a question of how to structure your Groupings to match your requirements.
-----------------
... Then again, I could be totally wrong! Check the answer.
Check out posting guidelines here for faster more precise answers[/url].
I believe in Codd
... and Thinknook is my Chamber of Understanding
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply