The OrderReportCSharp demo
The OrderReportCSharp demo application provides an example of the C# files that can make up a .NET report application, along with a variety of report design documents.
The OrderReport demo is the standard Genero Report Writer demo. Each language supported by Genero Report Writer provides its own version of this demo. For a general understanding of the demo functionality, see The OrderReport demo.
The OrderReportCSharp demo is the C#-specific version of the OrderReport demo. This topic covers details specific to this C# version of the demo.
The project
The project workspace is named OrderReportCSharp.4pw. You can access the project from the Tutorials & Samples tab, located on the Welcome Page.
- Windows: C:\Users\<username>\Documents\My Genero Report Writer Files\samples\Reports\OrderReportCSharp
- Linux: /home/<user>/ Genero Report Writer Files/samples/Reports/OrderReportCSharp
The C# source files
These are the application source files:
- CsharpDemoMain.cs
- Contains the Main module for the .NET application. This module creates an instance of the selection form and starts the run of the application.
- HttpServer.cs
- To view Web reports, a Web server is required. To meet this requirement, we provide this single-file "mini Web server" for the viewing of Web reports in a demo environment. It handles HTTP requests from the Web Report Viewer.
- OrderReportCSharp.cs
- This is the primary C# source. Specifically, it:
- Retrieves the data and outputs it to the Report Engine.
- Uses Reporting Runtime API functions to load the original settings from the form definition file (.4rp) and to make any changes to those default settings, based on the user selection in the form.
- OrderReportFileModel.cs
- One of the data sources of the report. The implementation of the report data model using the file OrderReport.unl
- OrderReportJDBCModel.cs
- One of the data sources of the report. The implementation of the report data model using JDBC with a MySQL officestore database.
- OrderReportModel.cs
- The abstract class that describes the report data model.
- SelectionWindows.cs
- This file handles the initialization of the form and the interaction of the user with the form,
eventually calling the
runReport
method of theOrderReportCSharp
class. - SelectionWindows.Designer.cs
- This file holds the demo form's layout information.
The report design documents are common to all flavors of the OrderReport demos. See Using the OrderReport demo.