I have a report that contains 3 parameters. Start Date, End Date and Segment. The Segment parameter is a multi-value and is set-up as a default. When I run the report (after clicking view report) the Segment parameter value goes blank. When I select several values the report runs, but when I select all the parameter removes the default. I tried to troubleshoot the issue in Visual Studio 2013 and it runs fine, the issue is when it runs from the SSRS report server. Please advice. Thanks.
1 Answers
You can resolve the no data issue by doing the following:
assuming that your parameter names are :
@startdate, @enddate,@segment
Get a list of distinct segment values for your segment dataset.
For that you need to do something like the following
Assuming your table name is segmenttable and your column is segmentcolumn and there is a date somewhere that you join to do get all the distinct segment columns between the dates.. set your query for the segment parameter list to the following (something similar of course)
select distinct
segmentcolumn
from segmenttable
where segmenttable.segmentdate between @start_date and @enddate
This will always ensure that the segment parameter only has values between the dates that is selected and never any value that has "no data" associated with the segment..
Now set your available value and default value for your @segment parameter from this dataset. Done!