[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 997
  • Last Modified:

2008 SSRS Filter

I  create a report on SSRS 2008, and I am tring to use Multi Value filter to select produst name or supplier name. I can select Null because there is no Null option on the drop down list!!!
sometimes I dont have a supplier naem or product name and when I select all it gave me everything in the parameter string but not the Null value.

Thanks
0
DBA2010
Asked:
DBA2010
  • 3
  • 2
1 Solution
 
Nico BontenbalCommented:
Please check my example in this question:
http://www.experts-exchange.com/Database/MS-SQL-Server/MS-SQL_Reporting/Q_27026629.html?cid=1576
It is bit different but you can use the same technique. You can add an 'empty' value to your list instead of the 'indifferent' value I added in this example. Then in your query you can use the
or 0 in (@Project)

Open in new window

trick to show the records without a product/supplier.
0
 
DBA2010Author Commented:
its a filter not a parameter
0
 
Nico BontenbalCommented:
Sorry. That's a Dataset or Tablix filter then I suppose?

Could you use an expression like this on your filter:
=iif(isnothing(Fields!Customerid.Value),0,Fields!personid.Value)

Open in new window

This would return 0 if the Customerid is null. Now you can use operator = and Value 0.
If you have Customers with id 0 in the database you could use -1 (or any other value not in your database) instead of 0 in the expression and the value.
0
 
DBA2010Author Commented:
Actully what I did.
update the Supplier data set select statment
Union '' from supplier
and now I have '' value in the parameter drop menu.

Thanks

Do you have an idea if we can create an alert message when we run the report  to check like if the start date < End date

Thanks
0
 
Nico BontenbalCommented:
<<and now I have '' value in the parameter drop menu.>>
So it was a parameter, not a filter?

<<Do you have an idea if we can create an alert message when we run the report  to check like if the start date < End date>>
Yes, but since your original question got answered you should close this one an add a new one. This makes the information easier to find for anyone who is trying to find a specific solution.
But in this other question I would then answer you that you can add a text box with the warning message to your report (for example with a large red font). Then you set the visible property of this text box to something like
Start date >= End date
And the visible property of your tablix/table you set to
Start date <= End date
You can find other techniques when you search on google for:
"parameter validation" ssrs
(Including the quotes)
0

Featured Post

Granular recovery for Microsoft Exchange

With Veeam Explorer for Microsoft Exchange you can choose the Exchange Servers and restore points you’re interested in, and Veeam Explorer will present the contents of those mailbox stores for browsing, searching and exporting.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now