Wednesday, March 28, 2012

ReportViewer and pdf export

Hello,

I created a report using the ReportViewer control in client mode. The report is designed for the landscape orientation. In the rdlc file, the width is set to 11in and the height is set to 8.5in . When I export the file using the pdf format, it always uses the portrait orientation and thus cuts the main report table. I tried different page sizes, I can't figure out how to make the report viewer create a pdf file that uses the landscape orientation. Please help.

Thanks and regards,

Phil

Its based on the printer's default settings. Change those and it should work.

Eric

|||

Do you mean that the client user should set the default orientation of his default printer to Landscape or are you talking about server settings?

This is unrelated but my post was moved to SQL Server Reporting Services. I use VS 2005 on an Oracle database via ODBC. I don't know whether all ReportViewer related posts are moved here, but this is confusing for people who don't use SQL Server, like me.

Thanks and regards,

Phil

|||

Not sure, try server first then client.

Eric

|||

Changing the properties of the local printer has no effect (actually, you don't even need a local printer to export the report). I can't change the server printer settings and anyway some of my reports use the portrait orientation that I also need. There must be a way to make the report viewer export a pdf file with either the landscape or portrait format based on report settings...

Thanks and regards,

Phil

|||

Are you sure thatall the different size settings are set to width: 11in, height: 8.5in...?

In the "REPORT", there is both an "Interactive Size" and a "Page Size"... and then in the "BODY" there is also a "Size" setting. You are sure that you set the correct one?

Good luck!

|||

Ouch, I feel stupid now... I was only setting the BODY size, I never noticed that there is also a REPORT size, and that both sizes are independant. Thank you very much for your help, it is working now.

|||

Hi,

Can you specify what you did to overcome this problem. I am facing the same problem.

And for which is there a "Report" property. For a RDLC file or a reportviewer control. Because I dont find that for both of them.

To be more specific I have set all the four (Header , footer, body and also the report to width : 8.5 and height : 11 inch).

But Still i see 2 pages for PDF for one page.....

|||

Hello,

I opened the rdlc file in VS. In the menu bar, I went to Report >> Report Properties. I selected the second tab named Layout and I set the Page width and Page height properties to 11.69in and 8.27in (A4 landscape, 11in and 8.5in for US letter size).

HTH

Philippe

|||

Thanks Philippe. That was great and Thanks for the sooner reply.

|||

Click Report > Report Properties
Click the layout tab
Change the page width to 11
change the page height to 8.5

|||

Thanks.........

I did find the same in one of the sites and did.

Finally it did workout

|||

Thanks a lot

I spent two days to make page lanscape orientationSmile

No comments:

Post a Comment