Free Support Forum - aspose.com

Extra paragraph symbols when using LING reporting

I’m using LINQ reporting to conditionally hide parts of the document by wrapping it in <<if …>> tags.
For example
<<if [case.isFeature1()]>>
1. Section A
sdfsdfsdfsdf
sdfdsfsdf
<</if>>
2. Section B

It correctly hides portion of the content wrapped in the “if” tag however instead of the hidden text I get one extra paragraph symbol.
Is there something I need to change in my template to avoid an extra paragraph symbol?

@rkisin,

Thanks for your inquiry. Unfortunately, Aspose.Words does not support the requested feature at the moment. However, we have logged this feature request as WORDSNET-16953 in our issue tracking system. You will be notified via this forum thread once this feature is available.

We apologize for your inconvenience.

@rkisin,

We have looked again into your query and like to share with you that you can achieve your requirement using LINQ Reporting. Please check the attached documents and following code example. Hope this helps you.
Docs.zip (18.8 KB)

Document document = new Document(MyDir + "TestConditionalListItem.docx");
ReportingEngine engine = new ReportingEngine();
engine.BuildReport(document, false, "showSection1");
document.Save(MyDir + "TestConditionalListItem Out(false).docx");

The issues you have found earlier (filed as WORDSNET-16953) have been fixed in this Aspose.Words for .NET 18.10 update and this Aspose.Words for Java 18.10 update.