Excel export corrupted on release version only.

Posted by: robr123 on 3 August 2017, 3:19 pm EST

  • Posted 3 August 2017, 3:19 pm EST

    Hello:



    We have a problem where a report generated by our application exports perfectly to Excel from local code and inside our development environment, but after we build the solution the report gets corrupted.



    We've looked at it many different ways and can't seem to figure out the problem. We are using InstallShield Professional 2011 to create our build.



    Any assistance is greatly appreciated.



    Thanks,

    Rob
  • Replied 3 August 2017, 3:19 pm EST

    Hello,

    Since this issue is reproducible only with one report, please attach the RDLX of the file and let me try reproduce it.

    Regards,
    Prantik
  • Replied 3 August 2017, 3:19 pm EST

    Rob,

    Could you confirm if the reports are exported from the viewer's export menu or from some code that you have written? If it is through code, please share the code and let me try to reproduce the issue at my end.

    Regards,
    Prantik
  • Replied 3 August 2017, 3:19 pm EST

    Yes, we use the viewer's export menu. Here is the code snippet:



    case "Excel":

    {

    saveFileDialog.FileName = "*.xls";

    saveFileDialog.Filter = "Excel Spreadsheet|*.xls";

    if (saveFileDialog.ShowDialog() == DialogResult.OK)

    {

    string exportFile = saveFileDialog.FileName;

    System.IO.FileInfo myFile = new System.IO.FileInfo(exportFile);

    DataDynamics.Reports.Rendering.Excel.ExcelTransformationDevice renderingExtension = new DataDynamics.Reports.Rendering.Excel.ExcelTransformationDevice();

    DataDynamics.Reports.Rendering.IO.FileStreamProvider provider = new DataDynamics.Reports.Rendering.IO.FileStreamProvider(myFile.Directory, myFile.Name);

    runtime.Render(renderingExtension, provider);

    System.Diagnostics.Process.Start(exportFile);

    }

    }

    It is only for this one report - all other reports export fine. It corrupts only after we build, we can run inside VS 2010 fine.
  • Replied 3 August 2017, 3:19 pm EST

    Here is the .RDLX file and some XML data. Thanks for your assistance.
    2012/04/SampleReport.zip
  • Replied 3 August 2017, 3:19 pm EST

    Rob,

    I have sent you an email with the link to dowload one of the latest interim builds. Could you please check if it resolves the issue(I have not tested the RDLX as of yet).

    Regards,
    Prantik
  • Replied 3 August 2017, 3:19 pm EST

    Unfortunately it did not resolve the issue. I've attached a .ZIP file with the latest solution. Kindly review and let me know if you see anything odd. Thanks.
    2012/04/SampleReport-2.zip
  • Replied 3 August 2017, 3:19 pm EST

    Hello,

    I executed the sample sent by you, and I could observe that the exported report does not show up the second page in Excel. So, I just wanted to assure, is this the issue that you are currently facing or is it something else. Please elaborate the issue that you are exactly facing.

    Thanks,
    Manpreet Kaur
Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels