I am using the Aspose .Word to generate a report, using a word (Merger Filed) template, to display Orders in Tables. Since there can be multiple (more that 10) orders I want to display each order side-by-side in Tables . I tried to use Foreach loop but that is generating the table one after the other and not side by side.
Please let me know if there is any For loop implementation or any other way to achieve the functionality.
AsposeIssue.zip (42.3 KB)
Thanks for the reply. Since the size of the Console application is not allowing me to add it here I am attaching the word files and the Programe class Implementation of the console application.
Please use the <<next>> tag between two tables to get the desired output. We have modified the template document and attached it with this post for your kind reference. ExpectedTemplate.zip (13.1 KB)
Thanks for sharing the information about << next >> tag it worked for me with a little change in the template. But there is still one issue Can You help me with the tag or template for displaying the image from url . My each order object also has a property for ImageUrl which holds url of an image which i want to display at run time. I don’t want to use builder.InsertImage(imageUrl) . Is there is any tag like <<Image: order.Image>> ?
Thanks in advance.
Thanks tahir . That worked , I had a chance to work on some other requirements as well. Many of them i am able to use .
Wanted to know if we can preserve the decimal value while adding and substracting using variable i.e. <> keyword.
E.g. lets say i am iterating over a foreach loop and I need to add the Parameter into a variable <<var [dp =0] >>
<< foreach var x in itemList>>
<< var [dp = dp +x.amount] >>
<< /foreach>> <<[dp]>> -
in this case “x.amount” are decimal values , but the final value of <<[dp]>> does not contain the decimal part .
Please let me know if i can achieve this functionality of adding and substracting decimal values.
We suggest you please use <<var [dp = 0.0]>> in your template document.
If you still face problem, please ZIP and attach your template document and code example to reproduce this issue at our end. We will investigate the issue and provide you more information on it.