0
votes

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
How do you populate the default values for the Segment parameter?Harry
It is coming from another table. I also found out that if I uncheck one of the segment the report runs fine. The reason behind this is that one segment does not have data, but still running in Visual Studios with all segment selected is fine, but in SSRS report server that's were the problem occurred. Thanks.Arsee

1 Answers

0
votes

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!