Пример #1
0
 /// <summary>
 /// Generates the document using doc with table generator.
 /// </summary>
 private static void GenerateDocumentUsingDocWithTableAndChartsGenerator()
 {
     // Test refreshable document with table generation from template("Test_Template - 3.docx")
     DocumentGenerationInfo generationInfo = GetDocumentGenerationInfo("SampleDocumentWithTableAndChartsGenerator", "1.0", GetDataContext(),
                                             "Test_Template - 3.docx", false);
     SampleDocumentWithTableAndChartsGenerator sampleDocumentWithTableAndChartsGenerator = new SampleDocumentWithTableAndChartsGenerator(generationInfo, GetDataForLineChart(), GetDataForScatterChart());
     byte[] result = sampleDocumentWithTableAndChartsGenerator.GenerateDocument();
     WriteOutputToFile("Test_Template3_Out.docx", "Test_Template - 3.docx", result);
 }
Пример #2
0
        /// <summary>
        /// Generates the document using doc with table generator.
        /// </summary>
        private static void GenerateDocumentUsingDocWithTableAndChartsGenerator()
        {
            // Test refreshable document with table generation from template("Test_Template - 3.docx")
            DocumentGenerationInfo generationInfo = GetDocumentGenerationInfo("SampleDocumentWithTableAndChartsGenerator", "1.0", GetDataContext(),
                                                                              "Test_Template - 3.docx", false);
            SampleDocumentWithTableAndChartsGenerator sampleDocumentWithTableAndChartsGenerator = new SampleDocumentWithTableAndChartsGenerator(generationInfo, GetDataForLineChart(), GetDataForScatterChart());

            byte[] result = sampleDocumentWithTableAndChartsGenerator.GenerateDocument();
            WriteOutputToFile("Test_Template3_Out.docx", "Test_Template - 3.docx", result);
        }