none
How to write code for setting up reportviewer page layout? RRS feed

  • Question

  • Hi,I don't know how to write code for setting up reportviewer page layout
    attributes before running  project at design time by C# .net 2005. for
    example ,i want to write a code in my reportForm to show my reportviewer
    layout preview for users to be exactly A4 size or my reportviewer zoom mode
    to be 50 percent , without let to the users themselves set up output by
    clicking Page Setup Icon in Toolbar Menu.For Example like this code :

    private void RpmyReportForm_Load(object sender, EventArgs e)
    {
       this.reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.Normal);
       this.reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
       this.reportViewer1.ZoomPercent = 50;
       this.reportViewer1.RefreshReport();
    }

    But for setting backgroundcolor , forecolor , fontcolor , setting borderstyle
    or to set margin of the page layout , i don't know how to write code like above codes.
    So I want a sample code for setting up reportviewer page layout attributes.


    Thanks

    Sunday, December 9, 2007 12:32 PM