New line and new page in template using Linq


i’m using linq reporting engine to build reports.
How can i add a new line or new page based on a condition using the template ?
I’d like to do something like this (using template):

<<if [condition]>>
new line or new page


Hi Simone,
Thanks for your inquiry. You can use ControlChar.PAGE_BREAK or ControlChar.LINE_BREAK for field’s value to insert page break or line break. Please check following code example for your kind reference. Hope this helps you.

Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);

builder.writeln("<<if [true]>><<[s.getValue()]>><</if>>");

Sender sender = new Sender(ControlChar.PAGE_BREAK);
ReportingEngine engine = new ReportingEngine();
engine.buildReport(doc, sender, "s"); + "Out.docx");
public class Sender {
    public Sender(String value)
        _value = value;
    public String getValue() {
        return _value;
    private String _value;

Thank you very much !

Hi Simone,

Thanks for your feedback. Please feel free to ask if you have any question about Aspose.Words, we will be happy to help you.