Repeat table with static text issue

Hi Team,

We have a scenario, we have a repeat table with a single row and two cells, first cell has some static text and second cell has some content control from repeat control.

In this case, in source we don’t have data then it is removing whole table but I have some static text in first cell so I want to show or remain the table as it is except, repeat table related no data will be there but there will be static text and table.
So finally I need the table with static text.
Below I have attached the aspose document -

AsposeTemplate 4.docx (17.2 KB)

@dwagh You can achieve this by using an outer condition. Please see the attached sample template:
in.docx (16.3 KB)

test code without data:

List<string> data = new List<string>();

Document doc = new Document(@"C:\Temp\in.docx");
ReportingEngine engine= new ReportingEngine();
engine.Options = ReportBuildOptions.RemoveEmptyParagraphs;
engine.BuildReport(doc, data, "data");
doc.Save(@"C:\Temp\out_emptydata.docx");

out_emptydata.docx (11.5 KB)

test code with not empty data:

List<string> data = new List<string>();
data.Add("First Item");
data.Add("Second Item");
data.Add("Third Item");

Document doc = new Document(@"C:\Temp\in.docx");
ReportingEngine engine= new ReportingEngine();
engine.Options = ReportBuildOptions.RemoveEmptyParagraphs;
engine.BuildReport(doc, data, "data");
doc.Save(@"C:\Temp\out.docx");

out.docx (11.5 KB)