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

Posted

tags:

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

// For complete examples and data files, please go to https://github.com/groupdocsassembly/GroupDocs_Assembly_NET
// Initialize the engine
Report.Init();

// Open template file and create output file
FileStream template = File.OpenRead("../../../Samples/Single Row.docx");
FileStream output = File.Create("../../../Samples/Xml Single Row.docx");

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


// Open an inputfilestream for our data file
FileStream Xml = File.OpenRead("../../../Samples/Customers.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, "");
myReport.ProcessComplete();

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

// Opens the finished report
string fullPath = Path.GetFullPath("../../../Samples/Xml Single Row.docx");
System.Diagnostics.Process.Start(fullPath);

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

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