Report Viewer Landscape pdf export

Jeffrey picture Jeffrey · Jul 4, 2009 · Viewed 27k times · Source

what is to do to set landscape for a pdf export ?

using of System.Drawing.Printing.PageSettings before a refresh doesn't work.

        Type tip = reportViewer1.GetType();
        FieldInfo[] pr = tip.GetFields(BindingFlags.Instance | BindingFlags.NonPublic);
        System.Drawing.Printing.PageSettings ps = new System.Drawing.Printing.PageSettings();
        ps.Landscape = true;

       // ps.PaperSource=
        foreach (FieldInfo item in pr)
        {
            if (item.Name == "m_pageSettings")
            {
                item.SetValue(reportViewer1, ps);

            }
        }

Answer

Farzin Zaker picture Farzin Zaker · May 21, 2011

In Design View of your report (rdlc) select report and in the properties pane set the following items in page size

width :11in
height :8.5in