Home » Visual Studio

Reportviewer Paper size

Is there any way to set the paper size for the Reportviewer control other than at runtime using the Page Setup button.

It always defaults to "Letter" which is not really suitable for all countries.

I am using Visual Studio RC1 on Windows Forms application.


34 Answers Found


Answer 1

The problem is in RTM version too. Previous threads talk about this, but no solution at all. Waiting for some tips from MS.

Answer 2

The default paper  size is set  in the .rdlc file. Here's how you can set the default to Legal:

Open the .rdlc file using Report Designer. Then from the menu choose Report > Report Properties. In Report Properties dialog switch to Layout tab. Set Page Width to 612pt and Page Height to 1008pt. Save the report and run the application. Now when you open the Page Setup dialog in the ReportViewer control the paper size defaults to Legal.

Answer 3

Thank you Rajeev. However following on from what you have said, if one sets the size  to 1169pt wide and 827pt high, the default should be A4 landscape. However it still defaults  to Letter.

Please can you shed some more light.

Answer 4

I've managed to get it to default to A4, not by altering the rdlc file, but instead setting regional settings in Windows to Swedish. I'd really like a way to force A4 independently of regional settings.

Answer 5

In the Report Properties dialog if I set  Page width to 8.27in and Page height to 11.69in then the Page Setup dialog of ReportViewer defaults  to A4.

In the Report Properties dialog if I set Page width to 11.69in and Page height to 8.27in then the Page Setup dialog of ReportViewer defaults to A4, and Orientation defaults to Landscape.

Answer 6

Ok, works, thanks.
But here in Italy, if i set  21cm x 29,7cm (which actually means 8.27in x 11.69in but expressed in centimeters) it defaults  to Letter anyway. Not a big problem, i'll use inches, but i'd like to understand what happens undercover.
For now, i assume i'll use only inches sizes.

Moreover i would like to know if i can set page size  at runtime, so the user can decide the page  orientation before launching the reportviewer.


Answer 7

Thank you Rajeev. This is a workaround as 27.9cm and 21cm should also work. You have however solved my immediate issue.

Answer 8

Francois (and MS), i've tried 21cm x 29,7cm and 29,7cm x 21cm but still defaults  to letter  (using inches, as suggested by MS, it works).

Answer 9

I think this might be because the language of your Rdlc (or Rdl) file is set  to English (United States)?

Either set it to Default (meaning Regional settings) or Italian.

Hope this helps.

Answer 10

Robert, thanks for the clue but no luck.

I've tried the report language in: "Italian", "Italian (Italy)" and "Default" (i've verified that in my regional settings i have "Metrico decimale" as measurement system), i've setted both "InteractiveSize" and "PageSize" to 21cm x 29,7cm but the pagesize in the reportviewer always defaults  to Letter.

As told before, if i set  the pagesize in inches (8,27in x 11,69in) then the reportviewer  shows the correct "A4" pagesize, this mitigates the problem.

Answer 11

It would be nice to get some information from official sources on how all this is supposed to work!

Answer 12

 Robert Jeppesen wrote:
It would be nice to get some information from official sources on how all this is supposed to work!

Agreed! Where are you, MS?

Answer 13

There is a bug in ReportViewer, caused by a round off error. A fix will likely be made available in a service pack.

Answer 14

Thanks for the Information.

Come Service Pack Come Come Come....


Answer 15

Note that the bug isn't that the paper  size can't be set  at all.  You will not hit the bug if you specify the paper size  in inches, since no unit conversion is necessary for that case.  The display will still reflect the correct regional settings.

Answer 16

Hello ! how to find this rdlc or rdl file. I m using vb.net (vsstudio 2002) framerwork 1.1 and crystal report 9.2

Also facing the same prob.


Naimesh Trivedi


Answer 17

Just installed the VS 2005 SP1 Beta, and the problem is still here. I've submitted a bug report :


Where are you MS ?


Answer 18

You can set  the page size  to print in A4 by setting the page  size to A4 (21*29.7). If the page size isn't a standard size it seems to default to letter  in Report Manager.

This is very frustrating as id you set the page width to be a little but larger (say 31 * 29) to fit my report onto one page when printing and for the report to look normal when viewed through RM. When you print preview it'll print to a page (essentially shrinking the report to fit) and exporting it to Adobe it will fit to a page but the default when printing will be letter.

You can obviously change the print properties from Letter to A4 when printing and it will print to a page or export it to Adobe and print from there it but this isn't good enough really.

What we have done now is create small reports that they have to zoom into when using RM.....but they print properly

Viz studio  also has a bug in it. If you look at print preview that's how it might print on when viewed from Report Manager. If you then print from Viz Studio the report will print in Letter

Either that or set you organisation up to us Letter format printing..... and whilst you there change the time format to be mm dd yyyy


Answer 19

Anyone have a way to pass the report parameters to set  the Report Properties of paper  size to A4 at execution time?

I have a number of reports that can be run in the US or Int'l and would like to simply determine the correct papersize at run time.

Thank you...


Answer 20

We have the same issue, a single UK based SSRS server that handles reports for a global audience.  Very frustrating at the moment...

Answer 21

This is so frustrating. I have a problem where I set  my report layout to A4 landscape using inches. This is fine, but when i go to print preview it still displays as letter. if I click on the patge setup  icon, the page size  displays in the

pick list as A4 but doesn't actual change to A4 until I click ok. If i try to print any of the reports from report manager it prints as letter  - including if I export to .pdf! HELP!!!


Answer 22

Rajeev Karunakaran wrote:
In the Report Properties dialog if I set  Page width to 8.27in and Page height to 11.69in then the Page Setup dialog of ReportViewer defaults  to A4.

In the Report Properties dialog if I set Page width to 11.69in and Page height to 8.27in then the Page Setup dialog of ReportViewer defaults to A4, and Orientation defaults to Landscape.

Thanks Rajeev, this workaround also solved this rather frustrating problem for me this morning.




Answer 23

Our product uses SQL reporting services for its reports. Only one out of around 200 of our customers is affected by this issue, and nobody else that uses it has this problem.

We have tried all of the workarounds in this thread but nothing has worked for them. They have around 10 different print drivers and the same problem occurs with all of them. What could it be that is causing it to only affect them?

When will this be fixed?


Answer 24

For those of you who prefer centimetres, the actual page size  of A4 (Portrait) is 21.0058cm x 29.7cm which is an exact conversion from the inches values provided in earlier posts.

If these values are entered in the Report Layout properties rather than 21cm x 29.7cm, you will get A4 rather than Letter.

Answer 25

Oh ... there's still need for an update !!

Yes you CAN use 21.0058cm x 29.7cm and get the right (A4) values in the Page setup  dialog - but what about the margins ??

Yuo can use inches in the properties 2.5in;1in;1in;1in and get 25mm, 10mm, 10mm, 10mm in the Page setup dialog BUT when you print out the report it STIL USES the inches !!!!!!

And I HAVE danish language !

So an updata is needed very fast I think - don't you ?

Best regards
KSor, Denmark

Answer 26

 It is an omission (and one that Microsoft intend to correct in the future) that the print settings from the report definition can't be overridden for the built in print functionality, though you can always print manually as a workaround....



Abbas Keshvari... Web Developer and Programmer

Answer 27

Is there any answer on what Richard1234567 and Priddin are asking for?

I find myself in same situation...

Answer 28

Not wanting to be pedantic, or anything, but A4 is actually
21.02241038 * 29.73017788.

Not that many of us can see the last micron of width.

Answer 29

Rajeev Karunakaran wrote:
In the Report Properties dialog if I set  Page width to 8.27in and Page height to 11.69in then the Page Setup dialog of ReportViewer defaults  to A4.

In the Report Properties dialog if I set Page width to 11.69in and Page height to 8.27in then the Page Setup dialog of ReportViewer defaults to A4, and Orientation defaults to Landscape.

Thanks Rajeev, this workaround also solved this rather frustrating problem for me this morning.



Yeahh! I also stuck with this problem! And now has solved! Thank you very much


Answer 30

what is the detail operation?

Answer 31

You can edit the report file in visual  studio as pure xml.  You can Accurately manipulate paper  size here to match the paper size  seen in the printer dialog.. E.g Im using an epson printer with only 80mm with paper and this works fine.


Answer 32

Hi All,


Even i got stuck with the same issue.

i need to print few reports in all combinations below

Letter  Potrait  

Letter Landscape

Legal  Potrait

Legal landscape

But all the reports in print preview show Letter and Potrait Orientation By default and the users are not will to set  them manually every time they print the report using report control  viewer.


So please help me find a solution for this.


I have set both Page size  and interactive size as per the Legal and Letter sizes US (for bot Landscape and potrait orientations )


Answer 33

how to change the print setting in report viewer,

am using microsoft report viewer in windows  applications for my project to use print in the printsetting,is there any way to set  the paper  size for the Reportviewer control  other than at runtime  using the Page Setup button. It always defaults  to "Letter(size:Hight11.60 Width8.40inc)"   but i need Hight4.00 & width8.40inc for default,. how can i set that as default



please can u help me


Answer 34


One way to set  the paper  size at run time, and I'm not sure is the proper way, is to change the XML of the RDLC file itself.

I'm using something like :

XmlDocument xDoc = new XmlDocument();
      XmlNamespaceManager nsmgr = new XmlNamespaceManager(xDoc.NameTable);
      nsmgr.AddNamespace("nm", "http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition");
      nsmgr.AddNamespace("rd", "http://schemas.microsoft.com/SQLServer/reporting/reportdesigner");
        // set the width and height with the new values
        if (xDoc.DocumentElement != null)
          xDoc.DocumentElement.SelectNodes(String.Format("//nm:{0}", "InteractiveHeight"), nsmgr).Item(0).InnerText = Height;
          xDoc.DocumentElement.SelectNodes(String.Format("//nm:{0}", "InteractiveWidth"), nsmgr).Item(0).InnerText = Width;
          xDoc.DocumentElement.SelectNodes(String.Format("//nm:{0}", "PageHeight"), nsmgr).Item(0).InnerText = Height;
          xDoc.DocumentElement.SelectNodes(String.Format("//nm:{0}", "PageWidth"), nsmgr).Item(0).InnerText = Width;
      catch { }

After that I load the xml back using the ReportViewer.LocalReport.LoadReportDefinition   method

Hope this helps you.



I have reviewed the ISO29500-1. Although I have not yet read the document in it's entirety I do not see any reference to settings or tags that keep track of the size of the page. Is the page size just handled independently of the file format?



Hi, I have a problem, I'm trying to print a report made with Crystal Reports 10 and I'm coding with .NET 2005, I'm using a shared Dot Matrix printer (Epson LQ-2090), when I set the Custon Paper Size programatically, the printer always set the paper size to Letter and the pape size that I need to use is "Fanfold 358 x 305 mm" this is the code I have made :

CrystalDecisions.CrystalReports.Engine.ReportDocument CRReport;
System.Drawing.Printing.PrintDocument printDocument = new System.Drawing.Printing.PrintDocument();

int nCopy = Convert.ToInt32(numCopy.Value); //Set de number of copies
int sPage = Convert.ToInt32(txtPgStart.Text); //Set de number of start page
int ePage = Convert.ToInt32(txtPgEnd.Text); //Set de number of end page

 //This is where the report file is stored 
string Route = @"D:\Reports\";
CRReport = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
CRAXDRT.Application CRApp = new CRAXDRT.Application();
CRReport.Load(Route + @"MyCReport.rpt");

//Data Base conection
CrystalDecisions.Shared.ConnectionInfo oConexInfo;
CrystalDecisions.CrystalReports.Engine.Tables oListTables;
CrystalDecisions.Shared.TableLogOnInfo oTableConexInfo; 

oConexInfo = new CrystalDecisions.Shared.ConnectionInfo();
oConexInfo.ServerName = "MyServerName";
oConexInfo.DatabaseName = "MY_DBNAME";
oConexInfo.UserID = "Username";
oConexInfo.Password = "password"; 

 // Collecction of tables to make the report
oListTables = CRReport.Database.Tables; 

 // For each table found...
foreach (CrystalDecisions.CrystalReports.Engine.Table oTable1 in oListTables)
// ...obtain the conexion object
oTableConexInfo = oTable1.LogOnInfo;

// Set conection info to the object
oTableConexInfo.ConnectionInfo = oConexInfo;


 // Visualize Report in the CrystalReportViewer control


"@type_user", user_type_param);
CRReport.PrintOptions.PrinterName = printDocument.PrinterSettings.PrinterName; // My shared printer's name is : ////192.168.xxx.xxx//EPSON LQ-2090 ESC/P2 

if (user_type_param == 5) 


 int rawKind = 0;

//PrinterSettingsSettings = 18 is the "Fanfod 358 x 305 mm" kind of paper I need (I'ts a hardcoded index)

rawKind = (int)printDocument.PrinterSettings.PaperSizes[18].GetType().GetField("kind", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(printDocument.PrinterSettings.PaperSizes[18]); 

 CRReport.PrintOptions.PaperSize = (CrystalDecisions.Shared.PaperSize)rawKind; 


CrpSoat.ReportSource = CRReport;
CRReport.PrintToPrinter(nCopy, false, sPage, ePage);

Everything works but the printer always asume the Letter size as the Custom Paper Size, am I missing something ??

(sorry for my english)


I am using VB 2008 Professional

For my application i have designed several Crystal Reports.

Because i am using pre-printed stationary of diffrent sizes i need to select Diffrent Paper Size each time i want to view/print diff. report.

For that i need to change settings under 'Printer and Faxes' - Printing Preferences - Paper Size menu each time.

So how do i change the paper size programatically.



How can I create a user defined paper size to a network printer on Windows XP ?


i;m currenty using VS 2008 and i created a report in crystal all i want to create a custom size of paper

8.5 x 5.5 inches how can i do that

thanks if any help comes :)


i want my report to be 132 colums wide ie fanfold 15x12 inch.
How do i change the size of my report.

so my questions are :

1.How do one can change the size of report

2.How do one can change it's orientation. (portrait)

if i try with paper size 15x11inch its showing inproper page breaks. or by setting bottom and top margin its splitting into multiple pages.

Please help.


I need to create a form using InfoPath, and be able to use legal size paper. I do not have the option to change paper size. Does anyone know how to do this?

Thanks, LG


I have an XPS document with 3 pages of differing sizes (letter, ledger and legal) and i would like to print it through a single print job to the correct size paper for each page.

using System.Drawing.Printing.PrintDocument i can hook up to a print page event and set up the next page paper size so that each page prints correctly.

What is the reccommended process for doing this using System.Printing.PrintQueue for XPS documents?
Dear Sir,

I'm printing a document thru the printdocument.   But the problem is that after the page is printed paper goes up to the default page height ie; 11 inches.

I've done the following coding. still the problem persists. Can u suggest me a way out.

pkCustomSize1 AsNew System.Drawing.Printing.PaperSize("Custom Paper Size", 800, 600)

'paper size required is 8 inches width & 6 inches height

PrintDocument1.PrinterSettings.DefaultPageSettings.PaperSize = pkCustomSize1

with regards,




I have some reports that are wider than normal. I have set the report's InteractiveSize to 0in,0in, but I kept the report size to the standard 8.5,11.

When I run the report like this, the control is sized to about a third the with of the browser page width and the height is about half. Not good!

I then tried this combo: SizeToReportContent = "true" AsynchRendering="false" on the viewer and size changes but still get scroll bar.

So then I tried this:

<div style="overflow: visible;">< rsweb:ReportViewerID= "reportViewerControl"runat ="server" SizeToReportContent= "true"width ="4000" height="4000"></ rsweb:ReportViewer></ div>

And it gets rid of the scroll bars, but the report is wider then it needs to be. In any event this last "fix" feels too hacky and there ought to be a way to make the report just display properly without going through hoops.

And by the way, I also lose the ability to use the scroll-wheel to scroll the report, when I do this.



Sorry if this has already been discussed, but I cannot find anything in the search.

I am having a problem using the reportview webcontrol and having it generate and display a SSRS report full screen (width and height 100%) correctly on any browser other than IE7. Here is a simple page that demonstrates the problem:
<%@ Page Language="C#"AutoEventWireup="true"CodeFile="ReportingServices.aspx.cs"Inherits="ReportingServices.ReportingServices" %>
<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"Namespace="Microsoft.Reporting.WebForms"TagPrefix="rsweb" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">  
<head runat="server">  
<title>Reporting Services Module</title>
<style type="text/css">  
        html, body, form  
            margin: 0;  
            padding: 0;  
            height: 100%;  
            overflow: hidden;  
            font-family: Verdana, Tahoma, Arial;  
            font-size: small;  
<form id="form1"runat="server">  
<rsweb:ReportViewer ID="rptMain"runat="server"ProcessingMode="Remote"Width="100%"Height="100%"Style="margin-bottom: 30px;">  
<ServerReport ReportServerUrl="http://nb-pardue/reportserver$sql2005"ReportPath="/Report Project1/Report1"DisplayName="Test"/>

In Firefox 3.0.5, Opera 9.63, and Safari 3.2.1 the reports all show in a small box (300px, 300px or so) and I cannot get them to take up 100% of the browser.

I have installed ReportViewer 2008 SP1 and that did not do anything.

Does anyone know a solution for this?




I have tabs for report selection and in the last tab I have placed 2008 reportviewer control that displays the report based on the selection on other tabs. The report rendered has drillthrough links and shows the drillthrough report when the link is clicked. My question is at runtime how can I know if the reportviewer is showing the drillthrough report. The reason for this question is when reportviewer is showing the drillthrough report, if a user click any of the other tabs. I would like to prompt the user that to go back to the parent report to change report selections.


Hi,anybody.I'm a chinese.I work with VFP9.0.I'm sorry,my English is not werry well.

I have a default printer in my p.c system and I have a custom paper named "aaaa" in it.I want to make the custom paper "aaaa" as the default printer's default pqper in a program with codes.I don't now how the codes are written.please anybody tell me. Thanks!

I created a customized paper report on my dev machine. The report's size looks fine when run, the way I want the format to be. Then I compiled my vb.net application and copied the application to client machine. The preview of the report showed in "Letter" format instead of that I created. What did I do wrong? I've referred tohttp://support.businessobjects.com/...es/c2011657.asp but it can't help. the paper size I set is 5.5 inch x 5.5 inch I'm using win XP, crystal report for VS.NET 2003 (VB.NET)

Hey guys,

I am wondering if there is a way to change the paper size of some of the reports in CRM (for example Account Summary report). Or make it fit to one page? I don't believe it's my printer settings that I have to change because I went through every possible option to try and find a "Scale to Fit 1 page" Thanks!


OS: Windows 7 Ultimate x64
CPU: Intel(R) Core(TM)2 Duo CPU   T9400 @ 2.53GHz 2.53GHz

Using Windows Driver Test Manager Studio 1.5.7565.000 to launch an instance of 'Windows Touch logo Test (MANUAL)' on a client machine with Windows Driver Test Manager client installed on it. At the beginning screen in which it asks for the horizontal and vertical parameters I put those in based on the specs that I have and it comes back with the following error message every time:


"WARNING: Reported digitizer size cannot be correlated with actual screen size. Logo test results may not reflect accurate behavior , and the user experience with Windows Touch may be impaired. Please ensure correct support for physical size in the touch digitizer usages."

Clicking the 'OK' button allows the test to continue. However, as long as this error message comes up I can't consider any results valid. Also, the boxes in which to put in the sizes do not take decimal points, so it is not possible to give a completely accurate size.

Any help would be much appreciated.


For some reason, my program does not continue into the next part of the program when the user clicks on rock,paper, or scissors.  I used a loop for the program to continue.  I am not sure whether or not the "hand" variable is changing or not. 


p.s. you won't be able to see the images I am using because they are loading straight from my computer, however that should not affect the program as a hole because all that matters is where the user clicks.


You can see the program here:






I would like to know which is the max cache size for a single node and which is the max size for a single object in the cache.

I also would like to know how AppFabric will transfer large binary data between nodes (does AppFabric "chunk" the sending? is there a way to configure the behavior?)


Thank you



I am using Logshipping in Sql Server 2005, on my primary server logshipping is configured for every 15 minutes frequency. I have no problem in shipping logs to secondary server.

The problem i am facing is, my Transaction log file is having bigger size than actual size of the database for ex: my Database size is 16GB and transacion log size is 45 GB.

Did any one faced this problem before? any suggestions will be highly appreciated.


Thank you,




I'm hosting a webbrowser control and loading a URL that contains a a small form that is embedded in the larger web page content. After the page is loaded, I'm modifying the html/css in memory to deleted various html elements (mostly divs) that surround the embedded form div so that the end result is all you see in the browser is the sub form.

Problem I'm having is that i want to resize the webbrowser control to fix the displayed content so I can then center webbrowser control in the C# form. I can't figure how to do this.

I tried stuff like:

	webBrowser1.Height = webBrowser1.Document.Body.OffsetRectangle.Height;
webBrowser1.Width = webBrowser1.Document.Body.OffsetRectangle.Width;

But the browser continues to display scrollbars. I'm not that far off but enough to cause the scroll bars to appear. I new to working with the webbrowser and don't really understand how the cumulative sizing of all the nested elements works and how these correspond to the browser control size.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure