Main page
Employee Report
Description
This example shows how to build an Employee Report.
Steps to recreate
- Use the Report Builder to create report departments_employees (based on the departments, employees, projects and projects_employees tables in database IntranetDB).
- On Step 2 using the Build Query option select the following tables: departments, employees, projects and projects_employees. Then select department_id and department_name from table departments, select project_name from table projects, percent_allocation from table projects_employees plus emp_name and title fields from table employees.
In the 'Available Fields' sector select all fields except department_id.
- On Step 3 select department_name and emp_name as Group fields.
- On Step 4 select Group Outline.
- On Step 5 check Sum for percent_allocation field and Count for project_namefield.
- On Step 7 enable Enable Print mode and Create "printable version" link properties in section 'Display and Print options', and disable Record Separator. Also select emp_name for the Row Numbering Reset by property in section 'Features to include'.
- On Step 8 enable Create Search/Filter, select departments_department_id and ListBox in the Control Type field.
- For list box s_departments_department_id specify values in the following properties: IntranetDB in the Connection, departments in the Data Source, department_id in the Bound Column, department_name in the Text Column and Integer in the Data Type.
- Move field title from section detail to emp_name_Header.
- Switch to the HTML mode. Add Panel1 from the Forms tab.
- Add the Hide-Show components Action to Before Show event of Panel1. Also set the Action property to Hide, Condition Type property to Parameter, Compare As property to Text, Condition property to Equal.
Also for 'Parameter1' set the Name property to ViewMode, Source Type property to URL.
For 'Parameter2' set the Name property to "Print" and Source Type property to Expression.
- Add Panel2 from the Forms tab.
- Add the Hide-Show components Action to Before Show event of Panel2. Set the property values of the Action identical to described above.
- Make cosmetic changes as needed by modifying the text and captions within the HTML.
Database Tables Used
Database: IntranetDB
Tables: departments, employees, projects, projects_employees
Events Used
Hide-Show components Action of the Before Show event for form departments_employeesSearch, departments_employees_pro_Print link and Panel1 panel are used to hide components in the Print Mode.