Home Forums SQL Server 2005 Business Intelligence How do you query a report to determine if it will print in portrait or landscape? RE: How do you query a report to determine if it will print in portrait or landscape?

  • You can query the page size propeties via code and you don't have to parse the XML. See the following link which contains a VB.Net RS script:

    http://www.developmentnow.com/g/115_2005_10_0_0_616192/Probs-running-script-to-fix-linked-report-page-settings.htm

    Converted to C#

    ReportService2005.Property[] pageProps = new ReportService2005.Property[6];

    pageProps[0] = new ReportService2005.Property();

    pageProps[0].Name = "PageHeight";

    pageProps[1] = new ReportService2005.Property();

    pageProps[1].Name = "PageWidth";

    pageProps[2] = new ReportService2005.Property();

    pageProps[2].Name = "TopMargin";

    pageProps[3] = new ReportService2005.Property();

    pageProps[3].Name = "BottomMargin";

    pageProps[4] = new ReportService2005.Property();

    pageProps[4].Name = "LeftMargin";

    pageProps[5] = new ReportService2005.Property();

    pageProps[5].Name = "RightMargin";

    pageProps = _rs.GetProperties(string.Format("{0}{1}/{2}", _mainFolder, _masterFolder, MasterReport), pageProps);


    [font="Arial Narrow"](PHB) I think we should build an SQL database. (Dilbert) What color do you want that database? (PHB) I think mauve has the most RAM.[/font]