Hi,
While reading and XML file using the following code:
DataSet dataSet = new DataSet();
dataSet.readXml(new FileInputStream(new File(“pathToFile”)));
when having nested elements, I always have to use .first() to access each element using LINQ report engine.
Is there a way to avoid doing this, especially when I have a deep nested element that I want to access, I don’t want to do <<Element1.first().element2.first().element3.first()>>
Hi there,
Thanks for your inquiry. Could you please attach your XML, input Word document along with expected output here? We will then provide you more information about your query along with code.
Thank you for your reply. Here is a sample code:
DataSet dataSet = new DataSet();
dataSet.readXml(new FileInputStream(new File("test.xml")));
Document doc = new Document("test2.docx");
ReportingEngine engine = new ReportingEngine();
engine.buildReport(doc, dataSet, "doc");
doc.save("out.pdf");
Please find attached the files.