Excel export with word wrapping and cell merging

Posted by: derek.hansen on 25 April 2018, 2:28 pm EST

    • Post Options:
    • Link

    Posted 25 April 2018, 2:28 pm EST

    I have a large application that was written using ActiveReports 6 and recently upgraded it to use version 11. After doing that I noticed that when exporting reports to Excel it is behaving differently between the two versions dealing with word wrapping and cell merging. I have created two simple C# projects that demonstrate the Excel export differences and have attached them. One project uses ActiveReports version 6.3.4797 and the other uses 11.2.10750 (I did not include the referenced dlls, and the exact versions probably don’t matter).

    Both programs create a SectionReport that has three lines of text where the first line is multiline because of wrapped text. The v6 program displays the report correctly, and the Excel export (generated on closing) is correct with three cells containing all the report information. The v11 program displays the report correctly, but the Excel export only contains two cells with the second lines information missing.

    Is this a known bug, or is there a workaround to get the version 11 export to include all the information on the report?

    Thanks,

    ActiveReportsSupportExample2.zip

  • Posted 27 April 2018, 9:03 am EST

    Hello,

    Thanks for the information.

    I am able to replicate the problem at our end. I have escalated this to the development team(tracking id 257650) and will revert you back once have any information from them.

    Meanwhile, you can use the “TextBox” instead of the “DrawText” method to draw the text in report. Please refer the attached modified sample.

    Thanks,

    Mohit

    Version11_Modified.zip

  • Posted 2 May 2018, 3:22 am EST

    Hello Derek,

    You can also resolve your issue using a little gap between the drawtext. Please refer the modified code:

      report.CurrentPage.DrawText("This is a really long line so that it wraps", 1, 1, 1, LineHeight * 2);
                report.CurrentPage.DrawText("Second line", 1, 1 + (LineHeight * 2) + 0.01f, 1, LineHeight);
                report.CurrentPage.DrawText("Third line", 1, 1 + (LineHeight * 3) + 0.01f, 1, LineHeight);
    

    Hope it helps.

    Thanks,

    Mohit

  • Posted 7 May 2018, 1:48 pm EST

    Thanks. Adding the extra space does work but that would require a lot of experimentation and testing to figure out how much space is required for each field. I have a lot of existing reports that would require updating, so this solution won’t work for me.

    Can you tell me what version of ActiveReports this behavior changed on? I don’t want to have to downgrade all the way back to version 6.

  • Posted 8 May 2018, 7:32 am EST

    Hello,

    I am discussing with our development team to find the solution for this. Will inform you once we found any solution for this.

    Thanks,

    Mohit

  • Posted 29 May 2018, 7:27 am EST

    Hello,

    I am glad to tell you that your issue is fixed now. Please refer the following link for the hotfix:

    http://cdn.grapecity.com/ActiveReports/ar11/hotfixes/ActiveReports-v11.3.13403.0.msi

    Thanks,

    Mohit

  • Posted 9 May 2022, 2:19 am EST

Need extra support?

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

Learn More

Forum Channels