How to display table side wise with LINQ Reporting using C#

Hi Team,

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.

Thanks in Advance :slight_smile:

@nav007

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a standalone console application ( source code without compilation errors ) that you are using to generate the document.

We will investigate the issue and provide you more information on it. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.

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.

Thanks again

@nav007

We suggest you please read the following article.
Forcing Movement to Next Item within Data Band

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)

HI Tahir,

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.

@nav007

Yes, you can use <<image [image_expression]>> tag to insert image into document using URI.

We suggest you please read the following article.
Inserting Images Dynamically

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.

@nav007

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.