Hello All,
How do I change paramters dynamically based on user selection. For
example if I let the user select country in a drop down, and based on
the country, I need to load the states parameter, and based on the
states, the counties parameter etc...Is such a dynamic layout possible
using reporting services and VS.NET? If so how? Any links or code
samples would be really helpful.
Thanks,
ChrisYes you can do this. Reference the data set in the report parameter. In the
code snippet below, I have 2 parameters. The first report Parameter is
passed into the query parameter. The resulting data set is then use in the
second parameter and the report filters the data set based on that
parameter. Play with the .rdl a bit and you will get it to work.
<ReportParameters>
<ReportParameter Name="FirstName">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Brad</Value>
</Values>
</DefaultValue>
<ValidValues>
<ParameterValues>
<ParameterValue>
<Value>Brad</Value>
</ParameterValue>
<ParameterValue>
<Value>Jon</Value>
</ParameterValue>
<ParameterValue>
<Value>Steve</Value>
</ParameterValue>
</ParameterValues>
</ValidValues>
<Prompt>FirstName</Prompt>
</ReportParameter>
<ReportParameter Name="LastName">
<DataType>String</DataType>
<DefaultValue>
<Values>
<Value>Syputa</Value>
</Values>
</DefaultValue>
<Prompt>LastName</Prompt>
<ValidValues>
<DataSetReference>
<DataSetName>Northwind</DataSetName>
<ValueField>EmployeeLastName</ValueField> --Field(column) in the
dataset.
<LabelField>EmployeeLastName</LabelField>
</DataSetReference>
</ValidValues>
</ReportParameter>
</ReportParameters>
--
| From: chrispragash@.hotmail.com (CPragash)
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| Subject: Changing Parameters Dynamically
| Date: 14 Sep 2004 10:57:39 -0700
| Organization: http://groups.google.com
| Lines: 11
| Message-ID: <79c9faae.0409140957.43a028f6@.posting.google.com>
| NNTP-Posting-Host: 167.7.17.3
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1095184659 14011 127.0.0.1 (14 Sep 2004
17:57:39 GMT)
| X-Complaints-To: groups-abuse@.google.com
| NNTP-Posting-Date: Tue, 14 Sep 2004 17:57:39 +0000 (UTC)
| Path:
cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.sul.t-online.de!t-onlin
e.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!postnews2.google.com!no
t-for-mail
| Xref: cpmsftngxa06.phx.gbl microsoft.public.sqlserver.reportingsvcs:29153
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| Hello All,
|
| How do I change paramters dynamically based on user selection. For
| example if I let the user select country in a drop down, and based on
| the country, I need to load the states parameter, and based on the
| states, the counties parameter etc...Is such a dynamic layout possible
| using reporting services and VS.NET? If so how? Any links or code
| samples would be really helpful.
|
| Thanks,
| Chris
|
No comments:
Post a Comment