12

Is there a way to set an RDLC report to be always Landscape and to always use A4 without the need of manually doing so every time through the print dialog? I've been at this for a few hours and nothing came up after googling.

Indeed, is there a way to skip the print dialog in itself?

TIA

3 Answers 3

9

You can certainly avoid the print dialog and print directly, also you can specify page size and print orientation in code. We do it in our projects but the code is a bit of muddle plus it's in VB so I won't post a chunk of it here.

MSDN has a page titled Walkthrough: Printing a Local Report without Preview. This code has some XML to set the page size:

      "  <PageWidth>8.5in</PageWidth>" + _
      "  <PageHeight>11in</PageHeight>" + _

Change this to 29.7cm & 21cm for A4 Landscape.

3
4

As A4 size is 8.3 inches × 11.7 inches(Portrait).

So you need to set it to

report properties>Layout>Set page width and height.

Or you can manually print the report.

Look at this tutorial

Printing RDLC Report manually

2
  • Programmatically? On the fly? I have a few hundred reports with a prefix in the name that specifies the direction. Commented Jun 18, 2011 at 22:17
  • Zain Ali Setting up deviceInfo parameter through string XML did the trick. Commented Mar 9, 2017 at 13:16
3

Double click on your report (ex: report1.rdlc) in Solution Explorer then right click on the report page and select Report Properties and you can select your prefer paper size and orientation as shown below

enter image description here

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.