XmlDataLoadOptions Class
Wordize.Reporting.XmlDataLoadOptions class. Represents options for XML data loading.
XmlDataLoadOptions class
Represents options for XML data loading.
public class XmlDataLoadOptions
Constructors
Name | Description |
---|---|
XmlDataLoadOptions() | Initializes a new instance of this class with default options. |
Properties
Name | Description |
---|---|
AlwaysGenerateRootObject { get; set; } | Gets or sets a flag indicating whether a generated data source will always contain an object for an XML root element. If an XML root element has no attributes and all its child elements have same names, such an object is not created by default. |
Examples
Shows how to fill a template from a XML file using LINQ Reporting Engine and save the result to stream.
XmlDataLoadOptions xmlLoadOptions = new XmlDataLoadOptions();
xmlLoadOptions.AlwaysGenerateRootObject = true;
XmlDataSource ds = new XmlDataSource(MyDir + "ReportingData.xml", xmlLoadOptions);
using (Stream input = File.OpenRead(MyDir + "ReportingTemplateForeach.docx"))
using (Stream output = File.Create(ArtifactsDir + "ReportingForeachXmlDataSource.pdf"))
{
ReportBuilder.BuildReport(input, output, SaveFormat.Pdf, ds);
}
See Also
- namespace Wordize.Reporting
- assembly Wordize