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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 SSRS Exclude hidden row values from total
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Thameera
Starting Member

Sri Lanka
3 Posts

Posted - 01/24/2014 :  00:57:10  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 01/24/2014 :  01:17:51  Show Profile  Reply with Quote
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

Sri Lanka
3 Posts

Posted - 01/24/2014 :  03:22:15  Show Profile  Reply with Quote
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

India
52326 Posts

Posted - 01/24/2014 :  05:39:12  Show Profile  Reply with Quote
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

Sri Lanka
3 Posts

Posted - 01/24/2014 :  23:17:14  Show Profile  Reply with Quote
Still same error.. :(
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 01/27/2014 :  07:46:51  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.09 seconds. Powered By: Snitz Forums 2000