// 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/Bulleted List.docx");
FileStream output = File.Create("../../../Samples/Xml Bulleted List.docx");
// Create report process
Report myReport = new ReportPdf(template, output);
// Open an inputfilestream for our data file
FileStream Xml = File.OpenRead("../../../Samples/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, "SW");
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 Bulleted List.docx");
System.Diagnostics.Process.Start(fullPath);