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

Free Support Forum - aspose.com

LINQ Reporting: New Line after inserting document dynamically

Hi Team,

I am trying to insert a document dynamically using the <<doc [doc1] -build>> tag. However, When I try to do this inline, it adds a newline after the end of the inserted document. I want to keep the -build flag so that I can pass the data along to the inner document for rendering. How can I get it so that the inner document comes in without the newline?

the <<doc [doc1] -build>> days
results in:
the innerData


@cmitch79 You should also specify -inline switch to get the expected output, like this
<<doc [src] -inline -build>>
for example see the following code:

Document src = new Document();
src.FirstSection.Body.FirstParagraph.AppendChild(new Run(src, "This is source document"));

Document template = new Document();
template.FirstSection.Body.FirstParagraph.AppendChild(new Run(template, "text before \"<<doc [src] -inline -build>>\" text after"));

ReportingEngine engine = new ReportingEngine();
engine.BuildReport(template, src, "src");


Please see our documentation for more information:

1 Like

Whenever I include the -inline flag, I get an error:
" Tag 'doc' is not well-formed. Token 'inline' is unexpected."

Is there something that I need to include or update in order to be able to use that flag?

@cmitch79 It looks like you are using old version of Aspose.Words. -inline switch has been introduced in 22.11 version of Aspose.Words:

1 Like