ReportBuilderOptions.RemoveEmptyParagraphs

ReportBuilderOptions RemoveEmptyParagraphs property. Specifies that the engine should remove paragraphs becoming empty after template syntax tags are removed or replaced with empty values.

ReportBuilderOptions.RemoveEmptyParagraphs property

Specifies that the engine should remove paragraphs becoming empty after template syntax tags are removed or replaced with empty values.

public bool RemoveEmptyParagraphs { get; set; }

Examples

Shows how to remove paragraphs becoming empty after template syntax tags are removed or replaced with empty values.

string templateString = "<<var [value=\"This is rariable value\"]>>\r\n<<[value]>>";

ReportBuilderContext context = new ReportBuilderContext();
context.ReportBuilderOptions.RemoveEmptyParagraphs = true;

ReportBuilder.Create(context)
    .From(new MemoryStream(Encoding.UTF8.GetBytes(templateString)))
    .To(ArtifactsDir + "ReportBuilderOptions.RemoveEmptyParagraphs.docx")
    .Execute();

See Also