Output as Rich Text Format (C#)

Set up and configure output to Rich Text Format (RTF) from your reporting application. This option is useful if you want to edit your report after output.


This code snippet uses the RTFRenderer class:
// code snippet starts

String designFile = "OrderReport.4rp";
String outputFilename = "SalesList.rtf";
FormatHandler handler = new FormatWriter(outputFilename);
RTFRenderer renderer = new RTFRenderer(handler);
FourRpLayouter report = new FourRpLayouter(designFile, renderer);

report.debugLevel = 9;
Sales data = new Sales("Columbus Arts", 75038, new DateTime());


// code snippet ends
In this example:
  • A FormatHandler object named handler is defined using the FormatWriter class, taking the name of the output file as its input.
  • An object named renderer is defined using the RTFRenderer class, taking handler as input.
  • FourRpLayouter report = new FourRpLayouter(designFile, renderer) creates the FourRpLayouter object for the specified report file that outputs an RTF file with the provided name.

For the full list of properties and methods for this renderer class, refer to the Genero Report Writer .NET API documentation.