Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 SSRS TABLE & SUM IIF ISSUE

Author  Topic 

akulka58
Starting Member

1 Post

Posted - 2014-03-16 : 02:22:02
Hi All,

I am new to SSRS. I am facing 2 issues.

Issue No 1 – I have created 1 table/. Please refer below image.




Where I manually typed cost of tax. But when I am previewing report it’s come in all rows. Please refer below image.




I do not need Cost of Tax in all rows I need it only in one row. How can I do this?

Issue No 2 – I have created expression right to Cost of tax. Below is the function.

=sum(iif(Fields!RevisionNumber.value = 2,Fields!Status.value = 3,Fields!ShipMethodID.value = 4,Fields!TaxAmt,0)

The function is not working properly. Please guide me.

The final output in report should be like below image.



Cost of Tax 11512













James K
Master Smack Fu Yak Hacker

3873 Posts

Posted - 2014-03-16 : 08:25:59
I am not able to see the image, if you posted one. As for the IIF expression, the syntax is incorrect. IIF expressions need three parts, the first one that will evaluate a logical true or false, and the second and third the values (or something that will evaluate to values) that should be used if the first argument evaluates true and to false, resepctively.

Perhaps what you want is the following?

=sum(iif(Fields!RevisionNumber.value = 2 AND Fields!Status.value = 3 AND Fields!ShipMethodID.value = 4,Fields!TaxAmt,0)
Or, may be not. Can you explain in words the logic you are trying to implement?
Go to Top of Page
   

- Advertisement -