LINQ Reporting Engine - Column hide/show based on a condition in table

Hi, We have created a Aspose word template and we have a table in the document. We can use foreach condition in aspose template to renders the rows but we wants columns also to be render based on the condition.

Could some one please let us know how we can show/hide complete column in a table in aspose template conditionally.
example: Initially we have 4 columns and later based on condition we need to show just 3 columns and one we have to hide including header.

@Rajmal

Could you please clarify what template type do you mean: LINQ Reporting Engine or Mail Merge?

We are using LINQ Reporting Engine

@Rajmal

Basically, there are the following options to achieve this:

  1. Wait for resolution of WORDSNET-18034 that should bring an ability to affect table columns in addition to rows using the engine. We are already working on it and you will be notified through the forum thread once the feature is available.

  2. Use two tables in a template: One table with four columns and another one with three columns. Then, show only one of the tables depending on a condition using an if tag as follows: A true-if branch should contain the first table and a false-if branch should contain the latter one. More information on using of an if tag can be found at Working with Common Conditional Blocks.

Ok, thanks for the quick update.

1 Like

The issues you have found earlier (filed as WORDSNET-18034) have been fixed in this Aspose.Words for .NET 23.6 update also available on NuGet.

@Rajmal

Starting from Aspose.Words 23.6, LINQ Reporting Engine supports addition and removal of table columns. More information can be found at Working with Table-Column Conditional Blocks.