[]
RTF, or RichText format, opens in Microsoft Word, and is native to WordPad. This export does not render reports exactly as they appear in the Viewer due to inherent differences in the formats. You can set the property either in code using the RTFExport object after adding reference to MESCIUS.ActiveReports.Export.Word package in your project.
The RTF export now supports the CrossPlatform compatibility mode.
Usage:
Does not support:
RTF Export Properties
Property | Valid Values | Description |
---|---|---|
EnableShapes | True or False (default) | Indicates whether to export the Shapes and Lines to the RTF format if set to True. Microsoft Word is required to view it correctly. |
Pagination | True (default)or False | Indicates whether to use pagination for the output RTF document. |
Use the following steps to export reports through RTF export filters.
Create a new or open an existing Windows Forms App (.NET Framework or .NET) in Visual Studio project.
Go to the Project Explorer, right-click the project and select Add > New Item.
Select ActiveReports 19 Standalone Report > Add and choose Section report type, and then click Finish.
The xml-based Section report (report.rpx) is added.
Add a reference to MESCIUS.ActiveReports.Export.Word package in the project. See Manage ActiveReports Dependencies for more information.
In your project's Bin>Debug folder, place the report.rpx (Section Report).
On the Form.cs or Form.vb, double-click the title bar to create the Form_Load event.
In Form_Load event, add the following code to export Section Reports .
' Create a Section report.
Dim rpt As New GrapeCity.ActiveReports.SectionReport()
' For the code to work, report.rpx must be placed in the bin\debug folder of your project.
Dim xtr As New System.Xml.XmlTextReader(Application.StartupPath + "\report.rpx")
rpt.LoadLayout(xtr)
rpt.Run()
' Export the report in RTF format.
Dim RtfExport1 As New GrapeCity.ActiveReports.Export.Word.Section.RtfExport()
RtfExport1.Export(rpt.Document, Application.StartupPath + "\RTFExpt.rtf")
// Create a Section Report
GrapeCity.ActiveReports.SectionReport rpt = new GrapeCity.ActiveReports.SectionReport();
// For the code to work, report.rpx must be placed in the bin\debug folder of your project.
System.Xml.XmlTextReader xtr = new System.Xml.XmlTextReader(Application.StartupPath + "\\report.rpx");
rpt.LoadLayout(xtr);
rpt.Run();
// Export the report in RTF format.
GrapeCity.ActiveReports.Export.Word.Section.RtfExport RtfExport1 = new GrapeCity.ActiveReports.Export.Word.Section.RtfExport();
RtfExport1.Export(rpt.Document, Application.StartupPath + "\\RTFExpt.rtf");