Solved

# SSRS 2005 - calculate list total

Posted on 2006-04-10
Medium Priority
242 Views
Hi Experts,

I've got the following data set in a matrix report:

Variety1    Variety2    Variety3
Mass (tons)         4             6                 9
Crates                340           510            750
Cartons Class1     1105        6543           8754
Cartons Class2      6543        7654          8754
Cartons Class3      6554        8765         8765

I'm using SQL Server Reporting Services 2005 and I'm trying to add an additional field at the bottom to display the total cartons for Variety1 , Variety2 etc. I don't know how to write the expression to calculate the carton totals so any help would be much appreciated.
0
Question by:avdvyver
• 2
• 2

LVL 14

Expert Comment

ID: 16426376
If your using a Matrix control, you should be able to right click the data cell you want to total, and then Right click and select Sub Total.
0

Author Comment

ID: 16427187
Hi Simon,

I'm already using the sub total function to display the totals on the right side of the report. What I'm trying to do here is to sum 3 data fields and display the total underneath it. I can use the following expression but this totals all the cartons (class 1, 2 and 3) and per variety:

=Sum(Fields!tot_ctns_c1.Value, "SQLDB") + Sum(Fields!tot_ctns_c2.Value, "SQLDB") + Sum(Fields!tot_ctns_c3.Value, "SQLDB").

Is this the type of thing that you recon must be calculated at query level or you know if SSRS provides the functionality to make these sort of calculations?
0

Author Comment

ID: 16427296
Sorry ... typo in the above msg. The expression above calculates the total cartons (class 1,2 and 3) regardless of variety. I need the totals (class 1,2 and 3) per variety. Hope that makes sence.
0

LVL 14

Accepted Solution

simon_kirk earned 750 total points
ID: 16434172
You can add sub totals to the right and bottom of a matrix control. Right click the row group and add the sub total.
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1. Set up your parameter at the report level as usual, check the box Multi-value, and set the Data Type to String 2. Set the Stored Procedure Parameter to varchar(max)  --<---- This part here is the key to it's success Example:    @cst_key var…
Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
Integration Management Part 2
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
###### Suggested Courses
Course of the Month17 days, 8 hours left to enroll