all groups > sql server reporting services > august 2006 >
You're in the

sql server reporting services

group:

Report Parameter Default Value from Column



Report Parameter Default Value from Column randy1200
8/4/2006 12:53:01 PM
sql server reporting services: DataSet2:
select MyCol1 from MySecondTable

In the Report Parameters dialog box, I add MyCol1 as a multi-value
parameter. When I run the report, I can select one or more values from the
MyCol1 drop-down. This works great.

The problem is I want the first value in MyCol1 to be the default value in
the drop-down. In the Default Values box, I select Non-queried, and use the
expression =Parameters!MyCol1.Value(0) This seems exactly right to me.

With the default value set as above, the report fails to run with the
following error: Error during processing of 'MyCol1' report parameter.

Any suggestions on how to fix this?

Thanks,
--
RE: Report Parameter Default Value from Column Kelly
8/4/2006 1:12:01 PM
You can create a hidden parameter but not multi-valued. Set its default
value as coming from a query and select MyCol1 in DataSet2, it should pull
the first value from the dataset. Then you can set the default value of the
multi-valued parameter to the value of the hidden parameter.

[quoted text, click to view]
RE: Report Parameter Default Value from Column magendo_man
8/5/2006 5:55:01 AM
I have done this by creating another dataset called someting like
MyCol1Default defined as:

SELECT TOP1 MyCol1 FROM MySecondTable

or

SELECT MIN(MyCol1) FROM MySecondTable

Then in the report parameter definition specify that the default comes from
dataset MyCol1Default and that the value is MyCol1.

HTH,
Magendo_man

[quoted text, click to view]
AddThis Social Bookmark Button