Tuesday, February 14, 2012

Changing Default Rendering Method of Reports

Ladies and Gents,

I have a question with regards to the default rendering extensions for reports. I am using RS 2005 with SP1.

I am accessing a report as follows:

http://<ReportServerName>/Reportserver?/<Folder>/<Report Name>

Sample: http://TestServer/Reportserver?/Special Reports/Dealer Report

This displays the parameter bar and the view report button. When pressing the view report button, the report is automatically rendered into HTML 4.0. Is there a way to use the existing parameter bar and automatically render the report to a different extension (such as PDF) when the parameters are entered and the View Report Button is pressed.

Thank You for any advice you can give,

Raph

No, but you can specify the render format in the report URL, e.g. http://TestServer/Reportserver?/Special Reports/Dealer Report&rs:Format=PDF&rs:Command=Render|||

Teo,

Thank you for your reply, and for all the other documents and articles you have created about reporting services. They have been a great help during my current project.

I was trying to prevent reinventing the wheel. By that, I mean having to create a web form to capture the parameters for our reports when the report server seems to have one that works effectively (with the exception that the default format of report rendering is HTML 4.0 which behaves very poorly with alternative browsers) .

If you have any advice on any existing parameter capture tool that anyone has developed with RS that will allow us to choose the render method, I would be happy to take it.

Again, Thanks for the quick reply.

Raph

|||I understand but the standard toolbar is not customizable and you have no way to capture the event. If this was a custom web application and use the ASP.NET 2.0 ReportViewer control, then you could capture the event. Now, if you want to get innovative, you could create an HttpHandler that will change the URL requests accordingly. If you decide to do so, you may find my RSHttpHandler sample useful (see the Chapter 18 code in this download).|||

Teo,

Again, thanks for the help. I will look into your suggestions and see if they can be leveraged to meet our needs.

Raph

|||

I have a question similar to this - about changing default rendering:

I only want to change the default zoom to be page width. I'm not sure if I'm able to do this in the following environment:

RS 2005 SP2 on top of SharePoint Services 3.0 - I'm using the ReportViewer web part. Given that real estate is a bit of an issue when rendering webparts in a sharepoint page with other content, I'd like the default zoom to be page width based on the height and width of the webpart - so that I don't have to scroll horizontally within the webpart to see the report.

I know you can resize the webpart window - but I've got other content on the page, and I can't make it large enough to display the report width, so I'd like the default zoom to fit the size of the webpart (at least horizontally, scrolling vertically is not a big deal.

Is there a way to set this so that the Report Viewer web part can be configured to do this?

Thanks

|||

I'm not really sure whether you could do this using your current technology, but it certainly seems possible:

http://msdn2.microsoft.com/en-us/library/ms152835.aspx

The following example uses the rc:Zoom parameter to set the zoom property of the report to Page Width:

http://servername/reportserver?/Sales/YearlySalesSummary&rs:Command=Render&rs:Format=HTML4.0&rc:Zoom=Page Width

|||Unfortunately, the Report Viewer web part doesn't surface the ZoomMode property of the underlying ASP.NET Report Viewer control. I suggest you add this to the wish list.|||I had to write my own web part to accomplish this in sts 2.0. SQL Server 2005 Service pack 2 was released recently, this allows you to run Sharepoint integration mode and possibly get a better view on reports.

No comments:

Post a Comment