Monday, March 19, 2012

Example of SetReportParameters (please)

I am building a web application which uses the report service to provide the
reports. (This is to allow outside users access to specific reports, I
render the report on the web-server, not the sql server).
Currently I have some reports built and tested (http://[Report server
name]/reports). I have build my web-interface and I can list the reports I
want to allow access to (while hiding the rest). I can also pull back the
name and default values for each of the parameters for the report. I can
even render and display the reports in question PROVIDED the parameters have
defaults.
I can ONLY render reports that have default parameters and cannot figure out
how to change the values in those parameters to render a different report.
For example, I have a report that takes 3 parameters: ApplicationID,
AppVersion, Language. All parameters have a default value so I can render
the report on the web server. I can also (and do) add to the calling page, a
label and textbox for each parameter. The label is the Parameter prompt, the
textbox contains the default value.
What I cannot do is change the value of the parameters.
I have found SetReportParameters in the BOL.
Public Sub SetReportParameters(
ByVal Report As String _
ByVal Parameters() As [Namespace].ReportParameter _
)
That's pretty much it.
Anyone have an example of this?
I need to do something like (pseudo code):
Parameter("ID") = "125"
Parameter("Version") = "3"
Parameter("Language") = "3"
etc.
I also searched the BOL for this: Parameters.SetValue but had no hits.
This should not be hard but I can't find an example.
begin 666 icon_smile_angry.gif
M1TE&.#EA#P`/`+,``/____R!AOK5J/IE9OI52OI&./H\*?HO&_HC%/H8#0``
M`,# P ```````````````"'Y! $```L`+ `````/``\`0 17<$FI:IWTE$+Z
M+L:!),JB<-4P$-584@.DBSPF)G9LWVB9'#(J @.A5RF6('2^4@.>MV4F.?G0'+V
C?!Z1$?<3`D&BJ@.^H(H8KR _(4+0I8@.JF7&&<H&NUBR0"`#L`
`
endHow are you calling the Report Server and receiving/displaying the reports?
You can affectively set the value of parameters by passing them in the URL
call to the report.
Would this work in your case?
Brian
"Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
news:%23AK%23c6DaEHA.3016@.tk2msftngp13.phx.gbl...
> I am building a web application which uses the report service to provide
the
> reports. (This is to allow outside users access to specific reports, I
> render the report on the web-server, not the sql server).
> Currently I have some reports built and tested (http://[Report server
> name]/reports). I have build my web-interface and I can list the reports I
> want to allow access to (while hiding the rest). I can also pull back the
> name and default values for each of the parameters for the report. I can
> even render and display the reports in question PROVIDED the parameters
have
> defaults.
> I can ONLY render reports that have default parameters and cannot figure
out
> how to change the values in those parameters to render a different report.
> For example, I have a report that takes 3 parameters: ApplicationID,
> AppVersion, Language. All parameters have a default value so I can render
> the report on the web server. I can also (and do) add to the calling page,
a
> label and textbox for each parameter. The label is the Parameter prompt,
the
> textbox contains the default value.
> What I cannot do is change the value of the parameters.
> I have found SetReportParameters in the BOL.
> Public Sub SetReportParameters(
> ByVal Report As String _
> ByVal Parameters() As [Namespace].ReportParameter _
> )
> That's pretty much it.
> Anyone have an example of this?
> I need to do something like (pseudo code):
> Parameter("ID") = "125"
> Parameter("Version") = "3"
> Parameter("Language") = "3"
> etc.
> I also searched the BOL for this: Parameters.SetValue but had no hits.
> This should not be hard but I can't find an example.
>
>|||No.
I am using the application on an external web-server which communicates
(securely we would hope!) to the SQL server Reporting Service on an internal
server.
It is imperative that we do not give users the ability to guess or
ultimately spoof some of the hidden parameters.
"G" <brian.grant@.si-intl-kc.com> wrote in message
news:OR9NEPEaEHA.3804@.TK2MSFTNGP10.phx.gbl...
> How are you calling the Report Server and receiving/displaying the
reports?
> You can affectively set the value of parameters by passing them in the URL
> call to the report.
> Would this work in your case?
> Brian
>
> "Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
> news:%23AK%23c6DaEHA.3016@.tk2msftngp13.phx.gbl...
> > I am building a web application which uses the report service to provide
> the
> > reports. (This is to allow outside users access to specific reports, I
> > render the report on the web-server, not the sql server).
> >
> > Currently I have some reports built and tested (http://[Report server
> > name]/reports). I have build my web-interface and I can list the reports
I
> > want to allow access to (while hiding the rest). I can also pull back
the
> > name and default values for each of the parameters for the report. I can
> > even render and display the reports in question PROVIDED the parameters
> have
> > defaults.
> >
> > I can ONLY render reports that have default parameters and cannot figure
> out
> > how to change the values in those parameters to render a different
report.
> >
> > For example, I have a report that takes 3 parameters: ApplicationID,
> > AppVersion, Language. All parameters have a default value so I can
render
> > the report on the web server. I can also (and do) add to the calling
page,
> a
> > label and textbox for each parameter. The label is the Parameter prompt,
> the
> > textbox contains the default value.
> >
> > What I cannot do is change the value of the parameters.
> >
> > I have found SetReportParameters in the BOL.
> >
> > Public Sub SetReportParameters(
> > ByVal Report As String _
> > ByVal Parameters() As [Namespace].ReportParameter _
> > )
> >
> > That's pretty much it.
> >
> > Anyone have an example of this?
> >
> > I need to do something like (pseudo code):
> >
> > Parameter("ID") = "125"
> > Parameter("Version") = "3"
> > Parameter("Language") = "3"
> >
> > etc.
> >
> > I also searched the BOL for this: Parameters.SetValue but had no hits.
> >
> > This should not be hard but I can't find an example.
> >
> >
> >
>|||The Render method of the Web service takes a Parameters argument that
represents the report-specific parameters. The Render documentation has an
example of passing parameters:
http://msdn.microsoft.com/library/?url=/library/en-us/RSPROG/htm/rsp_prog_soapapi_dev_86ea.asp?frame=true
--
Bryan Keller
Developer Documentation
SQL Server Reporting Services
A friendly reminder that this posting is provided "AS IS" with no
warranties, and confers no rights.
"Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
news:Oz0HxhEaEHA.1000@.TK2MSFTNGP12.phx.gbl...
> No.
> I am using the application on an external web-server which communicates
> (securely we would hope!) to the SQL server Reporting Service on an
internal
> server.
> It is imperative that we do not give users the ability to guess or
> ultimately spoof some of the hidden parameters.
>
> "G" <brian.grant@.si-intl-kc.com> wrote in message
> news:OR9NEPEaEHA.3804@.TK2MSFTNGP10.phx.gbl...
> > How are you calling the Report Server and receiving/displaying the
> reports?
> > You can affectively set the value of parameters by passing them in the
URL
> > call to the report.
> >
> > Would this work in your case?
> >
> > Brian
> >
> >
> > "Roger Twomey" <rogerdev@.vnet.on.ca> wrote in message
> > news:%23AK%23c6DaEHA.3016@.tk2msftngp13.phx.gbl...
> > > I am building a web application which uses the report service to
provide
> > the
> > > reports. (This is to allow outside users access to specific reports, I
> > > render the report on the web-server, not the sql server).
> > >
> > > Currently I have some reports built and tested (http://[Report server
> > > name]/reports). I have build my web-interface and I can list the
reports
> I
> > > want to allow access to (while hiding the rest). I can also pull back
> the
> > > name and default values for each of the parameters for the report. I
can
> > > even render and display the reports in question PROVIDED the
parameters
> > have
> > > defaults.
> > >
> > > I can ONLY render reports that have default parameters and cannot
figure
> > out
> > > how to change the values in those parameters to render a different
> report.
> > >
> > > For example, I have a report that takes 3 parameters: ApplicationID,
> > > AppVersion, Language. All parameters have a default value so I can
> render
> > > the report on the web server. I can also (and do) add to the calling
> page,
> > a
> > > label and textbox for each parameter. The label is the Parameter
prompt,
> > the
> > > textbox contains the default value.
> > >
> > > What I cannot do is change the value of the parameters.
> > >
> > > I have found SetReportParameters in the BOL.
> > >
> > > Public Sub SetReportParameters(
> > > ByVal Report As String _
> > > ByVal Parameters() As [Namespace].ReportParameter _
> > > )
> > >
> > > That's pretty much it.
> > >
> > > Anyone have an example of this?
> > >
> > > I need to do something like (pseudo code):
> > >
> > > Parameter("ID") = "125"
> > > Parameter("Version") = "3"
> > > Parameter("Language") = "3"
> > >
> > > etc.
> > >
> > > I also searched the BOL for this: Parameters.SetValue but had no hits.
> > >
> > > This should not be hard but I can't find an example.
> > >
> > >
> > >
> >
> >
>

No comments:

Post a Comment