SQL Server Report Builder 3.0 exclude empty fields
I am trying to generate reports with SQL Server Report Builder (my first time ever)
And I have a list with this fields: name, order, weight, temp
Sometimes the field order
has no value. And I want to filter the rows where order
开发者_如何学编程has no value!
With kind regards Marco
Are you using a dataset that has a query that you defined? If so you could base your query on the filter input. So for instance you could add a parameter to your Report Builder Report that passes in a value to your query (All, ,NotMissingOrder).
So the below takes in a param passed in from the report "@FilterParam" which as a value of NotMissingOrder if the filter is selected. This would exclude those records where Order doesn't have a value from the output. You could set the default value of the param to = 'All' So that otherwise everything would be returned:
Select *
From Table t
Where(isnull(t.Order,'MissingOrder') = @FilterParam
Or
@FilterParam = 'All')
精彩评论