public static void FormRTFDocument(string filename, ReportTable table) { RtfTree tree = new RtfTree(); string rtfBase = @"{\rtf1\ansi\deff0 {\fonttbl {\f0 Times New Roman;}}\fs24"; tree.LoadRtfText(rtfBase); //Load an RTF document from a file RtfTreeNode grp = new RtfTreeNode(RtfNodeType.Group); foreach (ReportRow row in table.Rows) { grp.AddTableRow(row.Cells); } tree.RootNode.FirstChild.AppendChild(grp); tree.SaveRtf(filename); //Get and print RTF code //Console.Write(tree.ToStringEx()); }