Summary
Step 1. Define the ‘Content View’ (usually vr_[ReportCode])
Step 2. Define the ‘Format View’ (usually vr_rpt[ReportCode])
Step 3. Add a new record in RptControl Table with AUTO_UPDATE='N'
Step 4. Add a new record in HRProMenu Table with AUTO_UPDATE='N'
1. Define the ‘Content View’
This view contain the content of the report with all columns in the report, this view usually contain inner join, outer join, union etc, to other tables.
e.g.
CREATE VIEW vr_PLRXX
AS
SELECT
E.EE_NO,
E.SURNAME,
E.OTHERNAME,
D.DEPT_NAME,
E.BASIC_SAL
FROM PLEMPLOYEE E
INNER JOIN PLDEPT D ON D.DEPT_CODE=E.DEPT_CODE
2. Define the ‘Format View’
This view is based on the ‘Content View’ with specially design field name that is used by the reportcontrol.frm to format the report.
CREATE VIEW vr_rptPLRXX
AS
SELECT
[Employee No.vr_PLRXX.EE_NO]=EE_NO,
[Surname.vr_PLRXX.SURNAME]=SURNAME,
[Othername.vr_PLRXX.OTHERNAME]=OTHERNAME,
[Department.vr_PLRXX.DEPT_NAME]=DEPT_NAME,
[Basic Salary.vr_PLRXX.BASIC_SAL]=BASIC_SAL
FROM vr_PLRXX
where the field name of the view consists of 4 parts [Report Column Heading.Lookup Table.Lookup Field.Format]. (format is optional)
1. Report Column Heading
Report Column Heading (e.g. Employee No) is the field name display in Field and Order By in the Report Control Screen
2. Lookup Table and Lookup Field
Lookup Table and Lookup Field (e.g. vr_PLRXX.EE_NO) is used by ReportControl to know how to find the popup when the user cick the ".." button in the value text box
3. Format
Format is optional and is supported
See also