Maintaining Report Syntaxes

Overview

Report syntaxes are used to generate report request codes and names, report numbers, email subject and message text, and report file names.

Process

Report Request Creation

The report request's Code is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report Request and the Syntax Code is REP_REQ_CODE_SYNTAX. Only one syntax should be in use per current lab or organisation.

The report request's Name is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report Request and the Syntax Code is REP_REQ_NAME_SYNTAX. Only one syntax should be in use per current lab or organisation.

Report Request Creation from Workbook

Configure a syntax to generate report request codes

The report request's Code is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report Request and the Syntax Code is WKBK_REP_REQ_CODE. Only one syntax should be in use per current lab or organisation.

Configure a syntax to generate report request names

The report request's Name is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report Request and the Syntax Code is WKBK_REP_REQ_NAME. Only one syntax should be in use per current lab or organisation.

Preliminary or Final Certificate Report Generation

Configure a syntax to generate report codes

The report's Report Code is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report and the Syntax Code is REPORT_CODE_SYNTAX. Only one syntax should be in use per current lab or organisation.

This is also applicable to when an internal report is created from workbook.

Configure a syntax to generate report numbers

The report's Report Number is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report Request and the Syntax Code is REPORT_NUMBER_SYNTAX. Only one syntax should be in use per current lab or organisation.

Configure a syntax to generate report file names

The report's Report Filename can be generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Report Filename and the Syntax Code is defined by the report template. The report request's Filename Syntax Code is inherited from the report template's Output File Name Syntax and is updatable by the user where a fixed report request's File Name is not entered.

Report Email Text

Configure a syntax to generate report email text

The report request's Email Subject Text is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Email Subject and the Syntax Code is EMAIL_SUBJECT_TEXT.

The report request's Email Message Text is generated using syntax from the current laboratory or organisation, where the syntax's Syntax Type is Email Message and the Syntax Code is EMAIL_MESSAGE_TEXT.

Syntax Generation Process

The syntax comprises a pattern (for example, $yyyy_###), a floor, ceiling and increment value, and the last number used for both the inner and outer patterns. Note that the magnitude of the ceiling must match the available size of pattern, for example, #### could only fit a number up to 9999.

Org-scope and lab-scope variables are available for use in the syntaxes. Variables can include references to properties of objects exposed to the syntax generator and can invoke custom scripts. Refer to Maintaining and Using Syntax Variables.

Multiple syntaxes can be generated in one run. When a syntax is generated, the last number is updated.

Examples

  1. A Report Request Code Syntax where the laboratory name is followed by fixed characters and an incrementing number:
    ${Laboratory.name.asEllipseValue}_RRC##########

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 9999999999
    • Outer Seq Increment = 1
    • Last No = 1302
  2. A Report Request Name Syntax where the laboratory name is followed by fixed characters and an incrementing number:
    ${Laboratory.name.asEllipseValue}_RRN##########

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 9999999999
    • Outer Seq Increment = 1
    • Last No = 12
  3. A Report Subject Text Syntax comprising the job name:
    Job Name $Job.name.asEllipseValue
  4. Job name followed by the number of samples:
    Job Name $Job.name.asEllipseValue Number of Samples
    $Job.numberOfSamples.asEllipseValue
  5. A Report Message Text Syntax comprising client name, job name and other text:
    To $Client.name.asEllipseValue
    Attached is the report for Job name $Job.name.asEllipseValue 
    Regards,
    CCLAS Administrator

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 1
    • Outer Seq Increment = 1
  6. A Report Code Syntax where the laboratory name is followed by fixed characters and an incrementing number:
    ${
    String Lab=Laboratory.name.asEllipseValue
    return Lab}_RC##########

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 9999999999
    • Outer Seq Increment = 1
    • Last No = 2869
  7. A Report Number Syntax where the laboratory name is followed by fixed characters and an incrementing number:
    ${
    String Lab=Laboratory.name.asEllipseValue
    return Lab}_U##########

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 9999999999
    • Outer Seq Increment = 1
    • Last No = 340
  8. A Report Filename Syntax comprising the laboratory name, client code, job name and report template code in the file name:
    ${
    String folder = Preference.fetch("USR_CLIENTROOTDIR")
    String lab = Laboratory.name.asEllipseValue
    String cli = ReportRequest.clientCode.asEllipseValue
    cli = cli.replace(" ","_")
    String job = Job.name.asEllipseValue
    String rrt = ReportTemplate.code.asEllipseValue
    otherVar = folder + lab + "/" + cli + "/" + job + "/" + rrt + "/r_"
    return otherVar
    }${yy}${MM}${dd}${HH}${mm}${ss}
  9. A Report Filename Syntax comprising the laboratory name, client code and running number sequence:
    ${
    String myPref = Preference.fetch("USR_CLIENTROOTDIR")
    String lab = Laboratory.name.asEllipseValue
    String cli = ReportRequest.clientCode.asEllipseValue
    cli = cli.replace(" ","_")
    otherVar = myPref + lab + "/" + cli
    return otherVar
    }_##########

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 99999999
    • Outer Seq Increment = 1
    • Last No = 962
  10. A Report Filename Syntax comprising the current date and time in a job status report file name:
    JobStatusReport_$yyyy$MM$dd${"_"}$HH$mm$ss$SS

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 99999999
    • Outer Seq Increment = 1
    • Last No = 527

    and the date variables are established for the syntax. Refer to the Syntax API.

  11. A Report Filename Syntax comprising the current date and time in a QC history report file name:
    ${
    "QCHISTORY_" + "$yyyy$MM$dd"+"_"+"$hh$mm$ss"
    }.CSV

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 9999999999
    • Outer Seq Increment = 1
    • Last No = 455

    and the date variables are established for the syntax. Refer to the Syntax API.

  12. A Report Filename Syntax comprising the job number in the file name:
    ${
    String JobNo=Job.name.asEllipseValue
    return JobNo
    }_##########

    where:

    • Outer Seq Floor = 1
    • Outer Seq Ceiling = 9999999999
    • Outer Seq Increment = 1
    • Last No = 1506