Create a Report program:
Creating a simple report program is quite similar to creating a maintenance program. Here is how it is done
- Open the X/E Developer Studio, from the Javra IDE.
- In the Menu tab , select a menu within which the Report program needs to be created. Here we select the menu ‘My_Menu’ in the Menu field.
- On the desired Menu program, right click and select New Program , as shown in figure below:
- Next window will prompt you to enter a name for the program being created, here we have used the name ‘c/custrtest.p’ . Click next.
- A new screen will ask for Program Type, here select the Report for in Batch (RE) and click next
- The next screen will ask you to link tables and fields to the Report. Select Skip in this step.
- Then click Done.
- After completing the above steps, the report program is created with an empty screen which can be viewed in XE Developer Studio for the selected program.
- Now add local widgets in the program from the widget panel as per your need to specify the criteria for your report.
- All the fields/widgets you add in the report program should be local variables.
- In the tab Widgets – Set the attributes for widgets as required.
- Make sure that you check Save in batch for those fields/widgets whose value you need in the report program in ‘Advance Widget Properties’ section.
- Press ‘Generate .s file’ button on toolbar after you finish adding the required widgets to generate ‘.s’ and corresponding ‘.p’ files .
A ‘.s’ file is generated so that the logical report program can have access to the fields as well as to the values present within the fields which are defined in the X/E report program. The screen below displays the report program after adding the fields to it and ‘Generate .s file’ button.
- The Generate .s file button adds a new toolbar button program x/xxxxrprintz-xcore-tb to open the print program. This button is visible only in the Javra IDE HTML5 client. This button opens the generic HTML5 program to execute the report.
- It adds x/xxxxrprint-tb-fo.p as a toolbar button to that program. This button is visible only in the X/E GUI client.
- It also adds x/xxxxrprint2.p, which is a generic X/E program which is included in X/E report programs in X/E GUI client.
Note: For report programs, fields are not directly added from the Screen-editor, by selecting the fields from the table, but they are added through the Widgets panel. The fields ‘Local var’ and ‘All values’ must always be selected.
The code snippet below shows the associated .s file for the report program:
/* ------------------------ Copyright Javra Software ---------------------------
File : c/custrtest.s
Description :
Created : 16/12/15 Javra Software
Date Author Version Description16/12/15 javra 1.00 Created
------------------------------------------------------------------------------*/{x/xxxxpvar.i} /* standard variables */
def input param v-inputparam as char no-undo. /* input parameters */
{x/xxxxs.i} /* standard include for reports */
def var v-salesrep as CHARACTER format "X(32)" no-undo. /* SalesRep: /
def var v-country as CHARACTER format "X(100)" no-undo. /\ Country: *//* fill the variables out of the inputparameter */
if lookup("v-salesrep",v-inputparam,chr(1)) > 0 then /* */
assign v-salesrep = entry(lookup("v-salesrep",v-inputparam,chr(1)) + 1, v-inputparam,chr(1)).if lookup("v-country",v-inputparam,chr(1)) > 0 then /* */
assign v-country = entry(lookup("v-country",v-inputparam,chr(1)) + 1, v-inputparam,chr(1)).
The code snippet below shows the associated _.p _file for the report program generated:
/* ------------------------ Copyright Javra Software ---------------------------
File : c/custrtest.s
Description :
Created : 16/12/15 Javra Software
Date Author Version Description
16/12/15 javra 1.00 Created
------------------------------------------------------------------------------*/
{c/custrtest.s}
{x/xxxxrhdr.i}/* Write the logic here as per your need for the report to be generated */
{x/xxxxrftr.i}
Through the Language tab a display name ‘Customer Report’ is given to the report program ‘c/custrtest.p’
- Next, reload the workspace to get the newly created report program in the main menu:

- Now, it is noticed that the newly created report program is displayed as a submenu under the menu My_Menu, as shown highlighted in the above figure.
- Click on the submenu ‘Customer Report’ to open the report program. Upon clicking the below screen is displayed.
- This [
] is always created for report programs whenever the ‘.s’ file is generated.
- After a ‘.s’ file is generated, if there are new widgets added to the report program from widget panel, then the ‘Generate .s file‘ button needs to be clicked each time a new widget is added.
- Open the Print/Batch screen by clicking on the [
] icon.
In order to run the report program in batch, it can be done by selecting the checkbox In Batch, and selecting a particular batch from the field Batch. Then click PRINT button. Whenever the batch runs, the report program is also processed.
If the report program needs to be processed manually uncheck In Batch checkbox, choose File in Output to and specify the filename in Filename field. Then click PRINT button.

After the report program is processed a report is generated based on the selections made, as shown in the figure below.