You can write, compile and
execute your report program from within Genero Studio.
This guided quick start illustrates how you should organize a Genero Studio project to manage the
files for a Java-based report application.
Before you begin, you must
have:
- Configured Genero Studio for Java
- Create a directory names Sales. The Sales serve as your project
directory. Inside
your Sales directory, create a sub-directory named src.
In this quickstart, you complete the steps to organize a project, where the report
application will be handwritten in Java. 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.
The Java
source will be provided for you. You would follow these same steps when writing your own
Java report application.
-
Select , then click OK.
-
Create the file to hold your report application code.
For this quick start, create a file named Sales.java. The
Sales.java file will contain the source code for the report application. We
provide you with a simple program for this quick start.
-
Fully expand the project to display all nodes in the tree.
-
Right-click on the Application node and select .
-
Name the file Sales.java 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 Java 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".
-
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.
-
Create the data schema file.
-
Select .
-
Type "
schemagen Sales.java
".
-
Type "
move schema1.xsd Sales.xsd
".
Sales.xsd is created.
-
Compile the program.
-
Right-click the application node and select .
The program executables are created and placed in the /bin
sub-directory.
-
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
src directory within your project directory. Add the file to the src node of your project.
-
Save the changes to the project.
-
Execute the program. Right-click on the application node and select
Execute.