Configuring the Reports Application

Forms See also
REPORT—JobNumbers Form

REPORT—Report Form

REPORT—ReportWizard Form

 

Overview

After the analytical process is completed, analytical reports, or certificates, are generated for jobs and sent to the client.

This process is pertinent to LIMS and laboratory managers who configure the LIMS, job report templates and reporting sessions in particular.

Process

Configuring Access to the Reports Application

Ensure the Report.exe file is located in the folder defined by the ExeDirectory Program Settings—GLOBALSETTINGS for CCLASMGR. Give users, or users with specific roles, access to the application by setting the AccessLevel Program Settings - REPORT. Once a user has sufficient access rights, they can run the Reports application either from the Reports node on the CCLAS menu or directly from the CCLAS Exe folder.

To display tips to users upon start up of the Reports application, enable the ShowTipOfTheDay Program Settings - REPORT, and enter the tips, with one tip per line, in a text file, place the file in a folder under the CCLAS root folder defined by the CCLASRootDirectory Program Settings—GLOBALSETTINGS for CCLASMGR, then set the TipofTheDayFile Program Settings - REPORT to the folder and file name, for example %CCLASRootDirectory%TIPS\REPORT.TIP.

To maintain the window size and position between closing and launching the Audit application, set the Window Program Settings - REPORT.

Configuring Report Job Search

To present the list-view panel with grid lines, enable the MainListViewGrid Program Settings - REPORT.

Jobs are located either from a nominated view (refer to Configuring Database Views for Report Job Search below), or directly from the database tables. Where they are located from database tables, the jobs are located either via client and project, or directly by job. The list of clients comes from the active list of clients in the PROFCLIENT table which are a subset of clients in the CLIENT table.

Access registration job data by database view, or database tables using the PROFJOB table directly, or using the CLIENT, CLIENT_PROJECT and PROFJOB tables in a drill-down:

Two methods exist to filter records returned to the list-view panel as each node is selected:

Define the columns of the grid based on the selected node type:

  • Clients node (only presented where job data is accessed by database tables using client-project-job drill-down)—Set the MainListViewColumnn Program Settings - REPORT to specify which columns from the CLIENT table are presented in the grid.
  • Projects node (only presented where job data is accessed by database tables using client-project-job drill-down—Set the Sub1ListViewColumnn Program Settings - REPORT to specify which columns from the CLIENT_PROJECT table are presented in the grid.
  • Jobs node—Set the Sub2ListViewColumnn Program Settings - REPORT to specify which columns from the database view or PROFJOB table are presented in the grid.
Configuring Database Views for Report Job Search

When searching for jobs for reporting, a database view allows for a logical presentation of data from multiple tables, with the benefits that the search then only operates on that one database view. Database views are created within the database itself.

Without using a database view, only properties from the PROFJOB table are displayed in the job list-view panel. Database views are used to construct a logical PROFJOB table. All queries on the PROFJOB or PROFJOBUSER tables are done on the view instead. Refer to Using Database Views.

Using a database view allows for the following to be displayed in the job browser:

  • Additional properties of the job (that is, those site-specific properties kept in the PROFJOBUSER table)
  • Additional properties of other objects associated with the job (for example, displaying the client name instead of the client code, displaying the contact name instead of the contact code, or contact and address details)
  • Aggregated statistics from any child table of the PROFJOB table, but grouped on the job number (for example, a dynamic count of the number of samples in a job, or a dynamic count of the samples not validated, or the number of tests in the job that belong to a particular laboratory section).

The application still maintains the links to other CCLAS EL tables, for example, CLIENT_CONTACT, PROFJOB_SCHEME.

Where the Report application displays clients in a tree-view, then the PROFCLIENT_CLIENT and PROFCLIENT_PROJECT tables are joined to the defined view also.

Enable the ListViewByClient Program Settings - REPORT to display clients in a tree-view in the Report application.

Since the STAFFPROGRAMEDIT table defines the tables and views that are available from which to select the fields, these settings are not specific to the laboratory or staff code used. Therefore, if different views are used for different staff or laboratory codes, then the user must take extra care when selecting the fields for the browser column headings.

Set the browser of the specific CCLAS EL application to point to the view instead of to the PROFJOB table.

To configure the Report application to point to a database view, set the BrowserView Program Settings - REPORT to the name of the view. The view name from the Example Database View on the PROFJOB Table above is PROFILE_PJVIEW.

Set the columns on display in the browser to come from the view instead of from the PROFJOB table.

To configure the columns on display in the Report application, set the Sub2ListViewColumnnProgram Settings - REPORT to the names of the columns in the view, for example:
Sub2ListViewColumn1=LABCODE,100,Lab
Sub2ListViewColumn2=PRO_JOB,100,Job
Sub2ListViewColumn3=CLI_LABCODE,100,Client Lab
Sub2ListViewColumn4=CLI_CODE,100,Client
Sub2ListViewColumn5=PROJ_CODE,100,Project
Sub2ListViewColumn6=ORDERNO,100,Order Number
Sub2ListViewColumn7=RECEIVED,120,Received,!YYMMDD HH:MM
Sub2ListViewColumn8=REQUIRED,120,Required
Sub2ListViewColumn9=PRODUCTCODE,100,Product
Sub2ListViewColumn10=JOBTYPE,50,Type
Sub2ListViewColumn11=CLI_NAME,150,Client Name
Sub2ListViewColumn12=NOUNKS,50,Number of Samples

The CCLAS EL application then looks for these fields in the view for display in the browser.

Configuring Job Report Generation

Place all job report templates in the folder defined by the TemplateDirectory Program Settings - REPORT.

The DefaultReportType Program Settings - REPORT defines the default report type for report generation. A report type can be Internal, Preliminary or Final. A preliminary report sets the date on which a job was first reported, and a final report sets the date on which a job was last reported. A user must have the CanChangeReportType Program Settings - REPORT enabled to have permission to change the default report type during report generation.

Enable the OutputfileHasTemplateInNameProgram Settings - REPORT to include the report template file name in the report's output file name.

The DefaultViewMode Program Settings - REPORT defines the default view mode of report generation. View none means that the job report is not presented to the user at all, View creating shows the generation as it occurs and presents the report to the user at the end of generation, and View at end shows no generation details and only presents the job report to the user at the end of generation. A user must have CanChangeViewMode Program Settings - REPORT enabled to have permission to change the view mode.

If a report template includes the Report Number attribute, then the report number is automatically determined using the Report SYSTEM Number Sequence. Refer to the Maintaining Unique Number Sequences process. The last number used for the sequence is updated to the next number in the sequence every time this is accessed. The report number is also included in the job's audit trail.

Enable the AutoEmail Program Settings - REPORT to default the Email? check box in the Analytical Report application to checked.

Job reports are generated either in job client mode (where one job report is generated for the job's primary client contact) or report client/s mode (where one or more job reports are generated for selected job's report client contacts).

For the job client mode:

  • The DefaultTemplate Program Settings - REPORT defines the default template for job reports.

  • Enable the AddEmailForCC Program Settings - REPORT to include a client's carbon copy in the list of email recipients, only applicable where email is enabled for the report generation.

  • Set the EmailCCDelimiter Program Settings - REPORT to the email address delimiter used by your emailing system, to conjoin those carbon copy email addresses.

  • Set the EmailSubjectText and EmailNotesText Program Settings - REPORT to the email subject and text when sending an email for the job's primary client contact.

For the report client/s mode:

  • Enable the AutoRefreshEmail Program Settings - REPORT to have email items updated automatically as client contacts are selected or de-selected in the Clients list.

Set the UpdateFormattedValue Program Settings - REPORT, such that, when a CUID scheme analyte's reportable value is determined from rounding and formatting processes, then the formatted value is saved to the CUID scheme analyte where the setting is:

  • Auto—Where the AutoStoreFormattedValue Program Settings—GLOBALSETTINGS for CCLASMGR is enabled, then the value of each PJCSA.FormattedValue in the current job, scheme and analyte is automatically calculated and stored.
  • Confirm—After a confirmation to proceed, then the value of each PJCSA.FormattedValue in the current job, scheme and analyte is calculated and stored.
  • None—The value of each PJCSA.FormattedValue in the current job, scheme and analyte is not updated.

Enable the UseShortName Program Settings - REPORT so that the analyte's short name is used in the analytical report instead of the analyte's code.

Enable the UpdateFormattedValue Program Settings - REPORT to update a CUID scheme analyte's Formatted Value upon rounding and reporting a final reported numerical result.

Update the MAPISessionString and MAPIPassword Program Settings - REPORT to contain the email server connection details and associated password, respectively.

Set the Edit1ListViewColumnnProgram Settings - REPORT to specify which columns from the JOBSCHEMEANALYTE table are presented in the scheme-analyte grid on the Scheme tab.

Note that although users can access the options to further filter the scheme-analyte grid content based on column criteria, this information is not preserved anywhere when the job report is saved or closed.

Set the Edit2ListViewColumnnProgram Settings - REPORT to specify which columns from the CUID table are presented in the sample grid on the Sample tab.

To allow users to further filter the sample grid content based on column criteria by presenting the Filter main menu option, set the CriteriaPROFCUIDn Program Settings - REPORT to specify the column filtering properties using the PROFJOBCUID table, and set the CurrentCriteriaPROFCUID Program Settings - REPORT to hold the current criteria.

Customising Job Report Generation

Job reporting often requires custom commands which are tailored to a laboratory's requirements. To add the name of a custom command to the Command main menu option in the Reports application, set the ReportScreenRunn Program Settings - REPORT to specify the custom commands.

Where the RepUDF.VBS VBScript file is located in the folder defined by the ConfigDirectory Program Settings—GLOBALSETTINGS for CCLASMGR and:

  • The BeforeOpenJob subroutine exists within the script file, when a job open is requested, then it is run to typically determine whether job report can proceed, and can cancel the job open, if required.
  • The AfterOpenJob subroutine exists within the script file, after a job is opened, then it is run to perform custom logic.
  • The AllowReportJob (sJob) subroutine exists within the script file, after a new job report is requested, then it is run to determine whether or not to the job is allowed to be reported. The return function value must be a null string to be able to create the report.

  • The RepUDF1 subroutine exists within the script file, before the analytical report is created in Microsoft Excel™, then it is run to perform custom logic.

  • The RepUDF2 subroutine exists within the script file, after the analytical report is created in Microsoft Excel™, then it is run to perform custom logic.

  • The RepUDF3 subroutine exists within the script file, before the analytical report is created in Microsoft Word™, then it is run to perform custom logic.

  • The RepUDF4 subroutine exists in RepUDF.VBS, it is run after the analytical report is created in Microsoft Word™.

  • The SetCustomReportScript subroutine exists within the script file, then it is run to generate a customised analytical report using a Crystal Report™ template.

  • The BeforeCrystalGenerate subroutine exists within the script file, before the analytical report is generated using Crystal Reports™, then it is run to perform custom logic.

  • The DuringCrystalGenerate subroutine exists within the script file, after the clsCrystalReport object is generated but before the Crystal Report™ is actually generated, then it is run to perform custom logic.

  • The AfterCrystalGenerate subroutine exists within the script file, after the analytical report is created using Crystal Reports™, then it is run to perform custom logic.

Related Topic

Generating Job Reports