2012年2月25日星期六

Disabling JavaScript for report shown in ASP.Net ReportViewer

Hey guys,
I could not figure out a way how to disable rendering using JavaScript when
displaying a report in ReportViewer (ASP.Net). I need to render for browser
with JavaScript disabled. Is there a way to pass those URL parameters to the
report or so? I didn't see where.
Thanks, ChristophYou can do it by using any rendering extentions, but HTML4.0,
but you'd loose all interactive features of the report and report's
pagination.
You'll have to build your own pagination.
"Christoph Wienands" <christoph.wienands@.siemens.remove.com> wrote in
message news:OYPKzrLEGHA.1312@.TK2MSFTNGP09.phx.gbl...
> Hey guys,
> I could not figure out a way how to disable rendering using JavaScript
> when displaying a report in ReportViewer (ASP.Net). I need to render for
> browser with JavaScript disabled. Is there a way to pass those URL
> parameters to the report or so? I didn't see where.
> Thanks, Christoph
>|||Hey Oleg,
> You can do it by using any rendering extentions, but HTML4.0,
> but you'd loose all interactive features of the report and report's
> pagination.
> You'll have to build your own pagination.
Thanks for your help. As far as I know, if I use URL access with something
like this
http://localhost/reportserver?%2fReports%2fMyReport&ReportingPeriod=20054&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&rc:JavaScript=False&rc:Toolbar=True
I get a report with:
1) Toolbar and paging support
2) No parameters showing
3) No JavaScript, it's all plain HTML <-- and that's the feature I need
The ReportViewer control has a couple properties like ShowToolbar or
ShowParameterPrompts where I can control #1 and 2. However, there is no
property for #3.
Anybody any idea?
Thanks, Christoph|||The toolbar is controlled by Javascript, once you set ..&rc:Toolbar=True..
it disables it and no javascript present.
You need to write your own code to simulate paging and a toolbar using the
web service approach.
Not too difficult to do.
"Christoph Wienands" <christoph.wienands@.siemens.remove.com> wrote in
message news:%23b1RozTEGHA.828@.TK2MSFTNGP10.phx.gbl...
> Hey Oleg,
>> You can do it by using any rendering extentions, but HTML4.0,
>> but you'd loose all interactive features of the report and report's
>> pagination.
>> You'll have to build your own pagination.
> Thanks for your help. As far as I know, if I use URL access with something
> like this
> http://localhost/reportserver?%2fReports%2fMyReport&ReportingPeriod=20054&rs:Command=Render&rs:Format=HTML4.0&rc:Parameters=False&rc:JavaScript=False&rc:Toolbar=True
> I get a report with:
> 1) Toolbar and paging support
> 2) No parameters showing
> 3) No JavaScript, it's all plain HTML <-- and that's the feature I need
> The ReportViewer control has a couple properties like ShowToolbar or
> ShowParameterPrompts where I can control #1 and 2. However, there is no
> property for #3.
> Anybody any idea?
> Thanks, Christoph
>|||"Oleg Yevteyev" <myfirstname001atgmaildotcom> wrote in message
news:eFo1cCVEGHA.1424@.TK2MSFTNGP12.phx.gbl...
> The toolbar is controlled by Javascript, once you set ..&rc:Toolbar=True..
> it disables it and no javascript present.
> You need to write your own code to simulate paging and a toolbar using the
> web service approach.
> Not too difficult to do.
Hey Oleg,
now I understand. Thanks for the hint. I didn't realize that JavaScript was
coupled with the toolbar. Since most of our reports are single pages reports
anyway I probably won't even have to do the paging.
Christoph

没有评论:

发表评论