I'm using the included ReportViewer sample (basically it just just loads the
reporting services report page in an ifram), and I'd like to set report
parameters for the report by my ASP.NET application which houses the report.
Is there any way to have my app set the parameter, without prompting the
user?
--JasonI added a helper method to the ReportViewer:
public void SetQueryParameter(
string ParameterName,
string ParameterValue)
{
SetParameter(ParameterName,ParameterValue);
}
To set a parameter value then is as easy as:
rv.SetQueryParameter("SalesOrderNumber", "SO6003");
HTH,
--
Scott
http://www.OdeToCode.com/blogs/scott/
On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
<jnadal@.comcast.net> wrote:
>I'm using the included ReportViewer sample (basically it just just loads the
>reporting services report page in an ifram), and I'd like to set report
>parameters for the report by my ASP.NET application which houses the report.
>Is there any way to have my app set the parameter, without prompting the
>user?
>--Jason
>|||Scott,
Thanks a ton -- I wasn't sure if that method would just be used for the
parameters for the reportservices UI or for the reports. That helped a
great deal!
--Jason
"Scott Allen" <bitmask@.[nospam].fred.net> wrote in message
news:qmlfn050dor01d5ailc98qvlejmn2tl0rh@.4ax.com...
> I added a helper method to the ReportViewer:
> public void SetQueryParameter(
> string ParameterName,
> string ParameterValue)
> {
> SetParameter(ParameterName,ParameterValue);
> }
>
> To set a parameter value then is as easy as:
> rv.SetQueryParameter("SalesOrderNumber", "SO6003");
> HTH,
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
> On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
> <jnadal@.comcast.net> wrote:
> >I'm using the included ReportViewer sample (basically it just just loads
the
> >reporting services report page in an ifram), and I'd like to set report
> >parameters for the report by my ASP.NET application which houses the
report.
> >Is there any way to have my app set the parameter, without prompting the
> >user?
> >
> >--Jason
> >
>|||What name space is the "SetParameter" method a member of?
I get a compile error when I tried to copy and paste as is.
Thanks!!
Spo
"Scott Allen" wrote:
> I added a helper method to the ReportViewer:
> public void SetQueryParameter(
> string ParameterName,
> string ParameterValue)
> {
> SetParameter(ParameterName,ParameterValue);
> }
>
> To set a parameter value then is as easy as:
> rv.SetQueryParameter("SalesOrderNumber", "SO6003");
> HTH,
> --
> Scott
> http://www.OdeToCode.com/blogs/scott/
> On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
> <jnadal@.comcast.net> wrote:
> >I'm using the included ReportViewer sample (basically it just just loads the
> >reporting services report page in an ifram), and I'd like to set report
> >parameters for the report by my ASP.NET application which houses the report.
> >Is there any way to have my app set the parameter, without prompting the
> >user?
> >
> >--Jason
> >
>|||NEVER MIND.
I read this too quick the 1st time, i now understand what your doing.
Sorry and Thanks!
"iamspo" wrote:
> What name space is the "SetParameter" method a member of?
> I get a compile error when I tried to copy and paste as is.
> Thanks!!
> Spo
> "Scott Allen" wrote:
> > I added a helper method to the ReportViewer:
> >
> > public void SetQueryParameter(
> > string ParameterName,
> > string ParameterValue)
> > {
> > SetParameter(ParameterName,ParameterValue);
> > }
> >
> >
> > To set a parameter value then is as easy as:
> >
> > rv.SetQueryParameter("SalesOrderNumber", "SO6003");
> >
> > HTH,
> >
> > --
> > Scott
> > http://www.OdeToCode.com/blogs/scott/
> >
> > On Thu, 21 Oct 2004 10:55:24 -0400, "Jason W. Nadal"
> > <jnadal@.comcast.net> wrote:
> >
> > >I'm using the included ReportViewer sample (basically it just just loads the
> > >reporting services report page in an ifram), and I'd like to set report
> > >parameters for the report by my ASP.NET application which houses the report.
> > >Is there any way to have my app set the parameter, without prompting the
> > >user?
> > >
> > >--Jason
> > >
> >
> >
No comments:
Post a Comment