June 6, 2012 at 3:43 pm
There are a couple of calculated fields that I'm using in the report I'm currently writing. I've been doing all the calculation in the query so far, so by the time it reaches SSRS, everything is already calculated, and reporting services do not have to do any additional work. I was wondering whether, it would be better any faster to do calculations in SSRS? So far I've done some testing on my own, and it seems that it is marginally quicker to use calculated fields in SSRS over doing the calculations in code.
June 7, 2012 at 3:43 pm
It's my opinion that doing calculations, when practical, in SQL is a better path. I have done plenty of calculations in SSRS though when it would be much harder or costly to do them in SQL. All my reports use stored procedures for their datasets which brings the added advantage of being able to change the calculation without having to redeploy the report.
June 7, 2012 at 5:41 pm
I'm with the above poster, i prefer to do all my calculations through SQL which i find faster than through SSRS
June 8, 2012 at 7:30 am
I'll add a 3rd voice in favor of resolving all calculations in a stored proc, inline table valued function, or view. Heh... so much so that if I don't need something like a Pie Chart, I just blast through the necessary HTML as well with the help of FOR XML PATH... and it's very, very fast.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 8, 2012 at 12:17 pm
As long as it's an "actual" calculation, I'd agree with all previous opinions. If calculation comes to mean something having to do with actually formatting the output, then put those in the SSRS part.
----------------------------------------------------------------------------------
Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?
June 8, 2012 at 12:57 pm
It's one field being multiplied by the other one to get totals. I do that in SQL, and then sum it in SSRS
June 8, 2012 at 1:04 pm
That is the practical approach that I would take.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply