locked
ReportViewer doesn't export footer to Excel RRS feed

  • Question

  • User1797020616 posted

    I have a problem with exporting to Excel. In an RDLC file, I have a body and a footer. After exporting to Excel, the footer is not showing properly.

    http://www.sendspace.com/file/bevi1i

    The link above is the RDLC file, exported Excel and exported PDF. In the PDF, everything is ok and looks good.

    Is there a known solution to this problem?

    Monday, September 2, 2013 1:48 AM

All replies

  • User1983249378 posted

    I dint saw your attachment.

    IF the footer is html footer below report , it wont be included in excel file.

    But if the footer is in rdlc report it will be exported.

    If you wrote the footer in html include it in rdlc report in design mode apply that style.

    Tuesday, September 3, 2013 6:44 AM
  • User1797020616 posted

    hellou thanks a lot for answer. footer is in rdlc. rdlc is included in link above. Generaly footer is exported but is not showed when open excel file but must go into View - and page align. In this case but file is not showed properly, is not look good. :D

    Tuesday, September 3, 2013 8:20 AM
  • User1143442848 posted

    Hi,

    According to your description, you want to export data from ReportViewer to Excel with footer.

    Firstly, please try to use the Crystal Reports to achieve the fuction.

    And here is a code snippet for you to refer to:

      ReportDocument RDObject = new ReportDocument();
                //loading the report
                RDObject.Load(Server.MapPath("Employee Saler.rpt"));
                //passing the parameter to report
                RDObject.SetParamaterValue("Employee ID", "AFTRD");
    
                ExportOptions exop = new ExportOptions();
                //setting the format to excel type
                ExcelFormatOptions excel = ExportOptions.CreateExcelFormatOptions();
                exop.ExportFormatType = ExportFormatType.Excel;
                exop.ExportFormatOptions = excel;
    
                //enabling the headers and footers for each page
                excel.ExportPageHeadersAndFooters = (ExportPageAreaKind.OnEachPage);
                CrystalReportViewer1.ReportSource = RDObject;
    
                //exporting the report
                RDObject.ExportToHttpResponse(exop, Response, true, "");
    

    More information please try to refer to the link:

    # Crystal Reports Excel Export Issue – page footer not being displayed

    http://scn.sap.com/thread/932121

    Secondly, please try to use the header to replace the footer. As you can control where you want your header to be shown when exported to excel by using the Excel device settings in rsreportserver.config available in Program Files\Microsoft SQL Server\MSSQL.X\Reporting Services\ReportServer folder. The name of the setting is SimplePageHeaders and by default its value is false which means that header will be the first row when exported to excel. If it is set to true, it will again not be shown in the normal view.

    More information, please try to refer to the link:

    # Footer does not exported to excel

    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/244ff1a0-c4c8-4980-8893-bc0fdda7dcc2/footer-does-not-exported-to-excel

     

    Best Regards,

    Lisa Zhang

    Tuesday, September 3, 2013 8:53 AM
  • User1797020616 posted

    thanks a lot, now we are using reportviewer 2010 bcz is free and simple for user. For reportviewer 2010 have somebody any opinion? We have created many reports for reportviewer and all must be changed when will using crystal report.

    Tuesday, September 3, 2013 9:02 AM
  • User1797020616 posted

    nobody have solution for reportvieweR?

    Monday, September 9, 2013 1:43 PM