Generate the data schema during compile

Add a post compile rule that generates the data schema with each compile of the C# source.

Before you begin:
  • Write a Genero Report Writer for C# report program.

To create a report, you must generate the data schema (.xsd) from the C# program source. You can generate it from the command line, giving you control of when it is generated. You can also generate it by including the command line options in the post compile rules, causing it to regenerate each time the program source is compiled.

  1. Open the report project open in Genero Studio for Report Writer, and set the configuration for .NET.
  2. Right-click on your application source file and select Advanced Properties.
  3. In the Post Compile command section, enter the following: xsd.exe filename.exe /language:CS /type:OrderReportModel, where filename is the name of the compiled .NET application.
    The rule has been added, to generate the data schema with each compile of the source.
  4. Compile the application. Right-click on the application node and select Compile.
    The data schema file is created.