Free Support Forum - aspose.com

LINQ Reporting Engine - Chart Losing Data when using InsertDocument

Please see the attached project.

AsposeSunburst.zip (332.5 KB)

        string saveLocation = "c:\\dd\\";
        string asposeTemplate = "template.docx";
        string title = "Title From Code";

        Assembly thisAssembly = Assembly.GetExecutingAssembly();
        Stream someStream = thisAssembly.GetManifestResourceStream("AsposeSunburst." + asposeTemplate);
        Document doc = new Aspose.Words.Document(someStream);
        ReportingEngine engine = new ReportingEngine();
        engine.BuildReport(doc, new object[] { title }, new string[] {"chartTitle" });

        doc.Save(saveLocation + "sun.docx");

        Document wrapped = new Document();
        DocumentBuilder dBuilder = new DocumentBuilder(wrapped);
        dBuilder.InsertDocument(doc, ImportFormatMode.UseDestinationStyles);

        wrapped.Save(saveLocation + "sunWrapped.docx");

The file named sun.docx will look as expected. sunWrapped.docx will show the sunburst chart, but without the LINQ merge applied.

outputFiles.zip (142.9 KB)

@dday515

Thanks for your inquiry. We have tested the scenario using the latest version of Aspose.Words for .NET 18.11 and have not found the shared issue. So, please use Aspose.Words for .NET 18.11. We have attached the output document with this post for your kind reference. 18.11.zip (65.2 KB)