csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成编号列表报告-CSharp-Windward Engine-R

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成编号列表报告-CSharp-Windward Engine-R相关的知识,希望对你有一定的参考价值。

// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET
class RunReportXml
{
    static void Main(string[] args)
    {
        // Initialize the engine
        Report.Init();

        // Open template file and create output file
        FileStream template = File.OpenRead("../../../../../Data/Samples/Source/Numbered List.docx");
        FileStream output = File.Create("../../../../../Data/Samples/Destination/Xml Numbered List.pdf");

        // Create report process
        Report myReport = new ReportPdf(template, output);

        // Open an inputfilestream for our data file
        FileStream Xml = File.OpenRead("../../../../../Data/Data Source/WW-Products.xml");

        // Open a data object to connect to our xml file
        IReportDataSource data = new XmlDataSourceImpl(Xml, false);

        // Run the report process
        myReport.ProcessSetup();
        // The second parameter is "" to tell the process that our data is the default data source
        myReport.ProcessData(data, "Products");
        myReport.ProcessComplete();

        // Close out of our template file and output
        output.Close();
        template.Close();
        Xml.Close();

        // Opens the finished report
        string fullPath = Path.GetFullPath("../../../../../Data/Samples/Destination/Xml Numbered List.pdf");
        System.Diagnostics.Process.Start(fullPath);
    }
}

以上是关于csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成编号列表报告-CSharp-Windward Engine-R的主要内容,如果未能解决你的问题,请参考以下文章

csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成编号列表报告-CSharp-Windward Engine-R

csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成单行报告-CSharp-Windward Engine-Run

csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource-GroupDocs.Assembly-RunBulletedLi

csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成单行报告 - Windward Engine-RunSing

csharp Plugins-GroupDocs.Assembly_NET_for_Windward-使用XML DataSource生成项目符号列表报告-Windward Engine-RunBul

csharp 实例-CSHARP-GroupDocs.Conversion.Examples.CSharp变频-ConvertWithCustomInputDataHandler.cs