Depending on the version of SSRS you are using, there was some quirky behavior with parameters between service packs. Check and make sure that you are on the latest service pack for your version of SSRS.
Main Topics
Browse All TopicsI've got a report that works great, except every time it runs, my user has to "select all" from the drop down parameter.
I would like the report to run with that parameter pre-populated.
The report is against a view called Backlog. I created a "New Dataset" under the data tab, and used the query "select distinct(rep) from backlog" and called it REP_LOV (for list of values)
Then, in the original report query I added "WHERE REP IN (@Rep)" to allow my user to select the rep from a dropdown list.
In Report Parameters, I set @Rep as Multi-Value, then for available values I set "From Query" and for the dataset i chose my newly created "REP_LOV" dataset and for the field value I chose "rep"... that all works great.
But in the Default values, I selected "From Query," and for the dataset I chose REP_LOV, and for the value field I chose Rep... and still, when I run the report, it doesn't pre-populate the drop down with anything. The drop down box starts out blank, and I have to choose something from that drop down, every time I run the report.
If I select the drop down, and click "select all" everythng runs fine, but I want it come up prepopulated, so my user doesn't have to click the dropdown list unless she wants to limit the query.
Any ideas?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
jgv,
I know what you mean when you say it "should" work. That's what I thought too. I deleted it and carefully rebuilt the parameter (using your screenshot to double check my work) and It's still not working. I don't have any way to check (or change) the service pack, so I may be up a creek. Any other ideas before I just tell my user to deal with it?
I wonder if it would be different if I created a view that returned my list of values, and hit it directly.
The most important thing is that the query returning the list used for default values has the exact same items listed in the same order as what is being used to populate the selection list. If you have the same dataset hooked up for both then that should be a no brainer. I confirmed that this works using SSRS 2005 service pack 2. If you are not on the latest service pack or an earlier version of SSRS then you may be out of luck as there's nothing else that I can suggest...sorry.
There's an outside chance that using a view will get this working so it's worth a shot. If you are on an earlier service pack (which is the source of the problem) and you do not have access to installing it then you at least have a reason to give the user for not being able to help.
Just to be sure, I put together a very simple report layout that you can use to test with. If this works to select all then the problem is with the query or the way the parameter was setup. If it does not select all then it's very likely your version of SSRS.
Make sure you have a shared datasource called DataSource1 in your project. Add a new blank report. In the top right window, right click the report and select View Code. Replace the xml with the code below. The report will contain 1 parameter which should have all items selected when your preview the report.
<?xml version="1.0" encoding="utf-8"?>
<Report xmlns="http://schemas.micr
<DataSources>
<DataSource Name="DataSource1">
<DataSourceReference>DataSou
<rd:DataSourceID>1cb65fa5-df
</DataSource>
</DataSources>
<BottomMargin>1in</BottomMarg
<RightMargin>1in</RightMargin
<ReportParameters>
<ReportParameter Name="Rep">
<DataType>String</DataType>
<DefaultValue>
<DataSetReference>
<DataSetName>DataSet1</DataSe
<ValueField>Parm</ValueField>
</DataSetReference>
</DefaultValue>
<AllowBlank>true</AllowBlank>
<Prompt>Rep</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>DataSet1</DataSe
<ValueField>Parm</ValueField>
<LabelField>Parm</LabelField>
</DataSetReference>
</ValidValues>
<MultiValue>true</MultiValue>
</ReportParameter>
</ReportParameters>
<rd:DrawGrid>true</rd:DrawGri
<InteractiveWidth>8.5in</Inte
<rd:SnapToGrid>true</rd:SnapT
<Body>
<Height>2in</Height>
</Body>
<rd:ReportID>d3c55347-f926-4
<LeftMargin>1in</LeftMargin>
<DataSets>
<DataSet Name="DataSet1">
<Query>
<rd:UseGenericDesigner>true</
<CommandText>SELECT '1' As Parm
UNION ALL
SELECT '2' As Parm
UNION ALL
SELECT '3' As Parm
UNION ALL
SELECT '4' As Parm</CommandText>
<DataSourceName>DataSource1</
</Query>
<Fields>
<Field Name="Parm">
<rd:TypeName>System.String</r
<DataField>Parm</DataField>
</Field>
</Fields>
</DataSet>
</DataSets>
<Code />
<Width>6.50001in</Width>
<InteractiveHeight>11in</Inte
<Language>en-US</Language>
<TopMargin>1in</TopMargin>
</Report>
jgv, thank you for your input. I finally simply started over. I recreated the view, recreated the report from scratch, and set up the parameters all over again... and it is working this time. I still can't see what's wrong with the old report, but it was your post that got me to start over. Thank you. Points well earned.
Business Accounts
Answer for Membership
by: jgvPosted on 2008-12-03 at 16:38:13ID: 23091793
The way you describe how you have it setup it should work. Using the same dataset for the list selection and default values should automatically select all items in the drop down list. I did test it to confirm. This screenshot shows how the parameter was setup.
param setup