October 30, 2017 at 10:22 am
Hi
I have below query Select Sum(Amount) from table1. In SSRS i have 2 columns . I have written IIF expression
. If Amount > 0 then value is stored in TextBox1 . If Amount < 0 then value is stored in TextBox2. At the end i want to display Sum of the values in both the Columns in the end.
Thanks
November 2, 2017 at 10:21 am
Your query is not very clear, however,
review these links you should have your answer for this and subsequent questions
>
https://stackoverflow.com/questions/18591177/sum-up-values-in-all-pages-in-textbox-in-page-footer-ssrs
https://stackoverflow.com/questions/5730916/summing-a-column-of-expressions-in-ssrs?rq=1
https://stackoverflow.com/questions/11861174/how-to-show-sum-of-a-column-at-the-table-footer-for-each-page-in-ssrs-2005?rq=1
November 2, 2017 at 10:26 am
Your post doesn't make a lot of sense here. Firstly the query Select Sum(Amount) from table1; will return a result set with a single row and single (unnamed) column. I'm pretty sure that SSRS does not accept unnamed columns.
Even so, secondly, if textbox 1 only displays the value if it is > 0, and textbox 2 if the value is < 0, only one textbox is going to have a value (depending on the value of sum(amount)). That means that the values of textbox1 + textbox2 is going to be the value of whatever has a value in it. 0 + 1000 = 1000. -1000 + 0 = -1000
Thom~
Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
Larnu.uk
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply