locked
How to solve blank page problem. RRS feed

  • Question

  • User-381248140 posted

    When I print report second page is always blank only header and footer is appear and remaining data prints on third page.

    Even number of pages does not contain any data. All data is only show on Odd number of pages.

    Can any one help me.

    Monday, March 16, 2015 4:54 AM

All replies

  • User-1151753377 posted

    Hi UsmanSaeed.ksa,

    Thank you for your post.

    Please refer to the code below.

    ReportDocument rptDocument = new ReportDocument();
    
        // Load report.
        rptDocument.Load(Server.MapPath("reportNameOrPath"));
    
        // Set report parameters is exist.
        ParameterFields parameterFields = new ParameterFields();
        ParameterField parameterField = null;
        ParameterDiscreteValue parameterValue = null;
        ...
    
        // 0, 0: to print all the pages.
        this.RptDocument.PrintToPrinter(1, false, 0, 0);

    You could wrap this code in a method which accept reportNameOrPath as a parameter, and call it for each report.

    Hope this could help you!

    Regards & Summer

    Wednesday, March 25, 2015 5:33 AM