Genero Studio lets you manage the files of a C#-based report application. You can write, compile and
execute your report program from within Genero Studio.
Before you begin, you must
have:
You will set up a project, add and organize source files, create a data schema, create a report
from a template, and test the application. You
will complete the steps to create and manage the development of a report program written in
C#. In this instance, the C# file is provided for you. Follow these same steps when coding a
.NET report program by hand.
-
Select , then click OK.
-
Create the file to hold your report application code.
-
Fully expand the project to display all nodes in the tree.
-
Right-click on the Application node and select .
-
Name the file Sales.cs and save it in your project
directory.
-
Replace the content of the file with the source code found in the topic Source code for a simple .NET report application.
-
Save your changes.
-
Rename your application node to match the fully qualified name (class name).
-
Right-click on the Application node and select .
-
For our example, enter "Sales".
-
Add the reference to gre.dll.
The gre.dll file contains the Genero Report Writer APIs.
-
Select the application node.
-
In the Properties view, enter
"
/reference:"$(GREDIR)/lib/dotnet/gre.dll"
" in the
Linker options property.
-
Save your project.
-
Click in the Project view, to give it focus.
-
Select
-
Provide your project with a name (such as Sales.4pw) and save it in your
project directory.
-
Compile the program.
-
Right-click the application node and select .
The program executables are created and placed in the /bin
sub-directory.
-
Copy gre.dll from
$(GREDIR)/lib/dotnet/gre.dll to the /bin
sub-directory.
The directory now contains both the executable (Sales.exe)
and gre.dll
-
Create the data schema file.
-
Select .
-
Navigate into the /bin directory.
-
Type "
xsd.exe /nologo Sales.exe /language:CS /type:Sales
".
The file schema0.xsd is created.
-
Rename schema0.xsd to Sales.xsd.
Note: This step is not mandatory, it is only for convenience.
-
Create a simple list report.
-
Select , then click OK.
The New Report From Template wizard opens, and the Schema
Association page displays.
-
In the Schema Location field, select the Sales.xsd data schema
you created in an earlier step. Click Next.
Remember, we are keeping this report simple for the quick start only!
-
On the Add Fields page, select one or more fields in the Available Fields pane and
add them to the Selected Fields pane. When you have at least one field selected, click
Next.
-
On the Variables page, enter your name (or any string) in the Value column for the
organizationName placeholder. Click Finish.
-
Select and name the file SalesList.4rp.
Save it in the project directory, and save it under the Library node in your
Project.
Optional: You can rename the Library node to Reports.
-
Save the changes to the project.
-
Execute the program. Right-click on the application node and select
Execute.