We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Linq Inserting images without line breaks

Hi,

I am using data set with two nested tables.Two nested tables have parent child relation.

I would like to display images horizontally like maximum two images in a row. I tried using <<next>> after image no use.Please find the below template text and output.Please let me know how to achieve this with aspose.words

Linq in template

<<foreach [e in Employees]>> <<[e.Name]>>
<<foreach [p in e.Pics]>><<image[e.photo]>><<next>><<image[e.photo]>><</foreach>>
<</foreach>>

Desired output:

Employee 1 
Image1   

Employee 2 
Image2  Image3 

Ouput with aspose

Employee 1 
Image1   Image1

Employee 2 
Image2   Image2

Thanks

Hi Swetha,
Thanks for your inquiry. Please see attached sample template Word document and XML data file and try running the following code:

Document doc = new Document(MyDir + @"sampleinput.docx");
DataSet ds = new  DataSet();
ds.ReadXml(MyDir + "sampledata.xml");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(doc, ds, "ds");
doc.Save(MyDir + @"17.2.0.docx");

Hope, this helps.
Best regards,

Hi Awaiz Hafeez

Thanks, code works.
I had problem in my template, as I was using table cells instead of textbox.

Regards,
Swetha