Best practice-DB or RS?
Hi There Thanks for your posting. I dont know your data structure, but to me you do not need column for every month. You could have one column for Month Say FinancialMonth and one column for category and then column for Actual and budget. If you trying to compare the current year data with previous year then you need to have another column for Financialyear. So your stored procedure output look like this Categoty FinancialYear FinancialMonth Actual Budget Stationery 2011 June 100 200 Stationery 2012 June 300 200 Bikes 2011 June 500 300 Bikes 2012 June 300 600 and so on. Now you can create a matrix report inside SSRS Put your category in Row group Put your FinancialYear and FinancialMonth in column group Put your budget and actual in data and you are done. If I misunderstood your problem please give some more details then someone might be able to help you out Many thanks Syed Qazafi Anjum
August 8th, 2012 5:34pm

When possible, it is generally better to perform data related calculations, filtering and transformations in the database queries than in the report. We have more power in the database to do this, better tools, and far better performance. If you look at the example Syed gave - you would calculate the Actual and Budget at the database level, and then pass these up to the report design he's shown. Sometimes when calculations are very simple, or we aren't dealing with much data then we can get away with doing calculations at the RDL level.Josh Ash
Free Windows Admin Tool Kit Click here and download it now
August 8th, 2012 8:21pm

Newish to RS (2005) and have to develop a report comparing budget to actual to last year sales and tons. I have the data in a stored proc that has category and then a column for every month (Jun-May). I need the Actual-Budget and Actual-LastY FOR EACH month by category. Is it easier to create a variable in RS and do the calc there or program it into the db and return it from the stored proc? Either way, it's a LOT of variables. Honestly, I learn so much from these forums, I doubt my career in IT would be very long without it.
August 12th, 2012 7:17am

Hi There Thanks for your posting. I dont know your data structure, but to me you do not need column for every month. You could have one column for Month Say FinancialMonth and one column for category and then column for Actual and budget. If you trying to compare the current year data with previous year then you need to have another column for Financialyear. So your stored procedure output look like this Categoty FinancialYear FinancialMonth Actual Budget Stationery 2011 June 100 200 Stationery 2012 June 300 200 Bikes 2011 June 500 300 Bikes 2012 June 300 600 and so on. Now you can create a matrix report inside SSRS Put your category in Row group Put your FinancialYear and FinancialMonth in column group Put your budget and actual in data and you are done. If I misunderstood your problem please give some more details then someone might be able to help you out Many thanks Syed Qazafi Anjum
Free Windows Admin Tool Kit Click here and download it now
August 12th, 2012 5:19pm

When possible, it is generally better to perform data related calculations, filtering and transformations in the database queries than in the report. We have more power in the database to do this, better tools, and far better performance. If you look at the example Syed gave - you would calculate the Actual and Budget at the database level, and then pass these up to the report design he's shown. Sometimes when calculations are very simple, or we aren't dealing with much data then we can get away with doing calculations at the RDL level.Josh Ash
August 12th, 2012 8:06pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics