Form

This example shows function frtf() for merging two rtf files with numbered lists.
One option is for processing list as simple text.
Another option is for processing list as formatted numbered list.


Report template for the main document

The first report template contains function frtf for merging the second document.

The second document contains numbered lists which are inserted to the first document.

Code to generate the report

private void button1_Click(object sender, EventArgs e)
{
ekRtf1.ClearVars();

ekRtf1.InFile = "MainDoc.rtf";
if (!File.Exists(ekRtf1.InFile)) { ekRtf1.InFile = "..\\..\\..\\" + ekRtf1.InFile; };

string fname;
fname = "ChildDoc.rtf";
if (!File.Exists(fname)) { fname = "..\\..\\..\\" + fname; };

ekRtf1.CreateVar("ChildDoc", "");
ekRtf1.VarByName("ChildDoc").AsString = File.ReadAllText(fname);

ekRtf1.ExecuteOpen();
}

private void radioButton1_CheckedChanged(object sender, EventArgs e)
{
if (radioButton1.Checked) {
ekRtf1.eoProcessLists = false;
ekRtf1.OutFile = "Result.rtf";
}
}

private void radioButton2_CheckedChanged(object sender, EventArgs e)
{
if (radioButton2.Checked)
{
ekRtf1.eoProcessLists = true;
ekRtf1.eoUniqueLists = true;
ekRtf1.OutFile = "Result2.rtf";
}
}


Result for the first (standard) option

Result for the second (new) option