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
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 SSRS Exclude hidden row values from total

Author  Topic 

Thameera
Starting Member

3 Posts

Posted - 2014-01-24 : 00:57:10
I have a column called "Total" in SQL reporting service report.

When generating report, I'm hiding some rows according to some formula,

But calculating the total that hidden rows values also calculating. Can I know how to exclude hidden row value from total value?

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-24 : 01:17:51
you need to replicate logic you used for hiding in total calculation also.
ie like
=SUM(IIF(Your hidden column logic,0,Fields!YourRequiredField.value))

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Thameera
Starting Member

3 Posts

Posted - 2014-01-24 : 03:22:15
Hi, I tried that way. So my formula like following.

=SUM(IIF(((Parameters!ExcludeZeroPaid.Value) = True AND (Fields!PaidAmt.Value = 0)),0,Fields!ToPay.Value))

But this is not working. After running report in total row showing #Error.
And if I change formula to
=SUM(IIF(((Parameters!ExcludeZeroPaid.Value) = True,0,Fields!ToPay.Value))
This is working.

But I need to add both conditions to the formula. Any idea please?
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-24 : 05:39:12
try
=SUM(IIF(((CBool(Parameters!ExcludeZeroPaid.Value)) = True AND (Val(Fields!PaidAmt.Value) = 0)),0,Fields!ToPay.Value))


------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page

Thameera
Starting Member

3 Posts

Posted - 2014-01-24 : 23:17:14
Still same error.. :(
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2014-01-27 : 07:46:51
quote:
Originally posted by Thameera

Still same error.. :(


are you applying some group?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/
https://www.facebook.com/VmBlogs
Go to Top of Page
   

- Advertisement -