How to get here:
-start up the application, select in top menu Reports->Manage or press Alt+M and then M keys;
Then:
--click "Add Rp." or press Alt+R keys or
--select existing report in left hand side grid and click "Modify Rp." button or press Alt+O keys.
The window presents all the information system needs to run a report. Please note, that
familiarizing with Managing Reports Overview is recommended before editing a report.
Report has the following properties:
-Name - Name of report visible on "Report Run" form;
-"Select" part: SELECT... - Part of HQL query responsible for selection of columns that are to be
displayed in report.
-"From" part: FROM... - Part of HQL query responsible for choosing database tables.
-"Where" part: WHERE... - Part of HQL query responsible for joining and constraining tables
entered in field ""From" part: FROM...".
-"Order by" part: ORDER BY... - Part of HQL query responsible for order in which results schould
be presented;
-"Select SUM part: SELECT... - Optional field. If you want to add report summary (eg. main report
contains list of jobs, and you wish to see sum of job prices grouped by payment type), type
proper HQL statement here. You are not restricted to SUM function - you can use any
aggregation HQL function.
-"Group by" part: GROUP BY... - Optional field, meaningful only if ""Select SUM part: SELECT..."
field is filled and contains aggregation HQL function like SUM. Enter here list of columns which
report`s summary schould be groupped by.
EXAMPLE
The following example shows basic syntax of report defined in HQL language.
Name:
Jobs
"Select" part: SELECT...:
j.titl as Job, j.payd as Paid,
trim(c.fnam || ' ' || c.name) as Customer, j.dicByStat.valu as
Status
"From" part: FROM...
Job j, Cus c
"Where" part: WHERE...
j.cus = c
"Order by" part: ORDER BY...
j.jdte desc
"Select SUM part: SELECT...
sum(j.pric) as Amount, c.name as Name, c.fnam as FirstName
"Group by" part: GROUP BY...
c.name, c.fnam