/
PDF Template Language

PDF Template Language

Summary

The PDF Template Language (PTL) has a host of functionality to get data from:

  • Sample information

  • Test values

  • Reserved words

  • Optional arguments

  • Custom functions

Sample Information

Term

Description

Term

Description

LogId

Visible log identifier used as name of sample

CompositeStart

Start date of composite

CompositeEnd

End date of composite

SampleReceived

Date received by lab

DateCreated

Date sample created in DATS

CreatedBy

User who created the sample

Comments

Any comments added to sample

Reserved Words

Term

Description

Example

Term

Description

Example

ReportMonthName

Date of newest selected sample as MMM-yy.

Jan-22

CurrentMonthName

Date of report creation as MMM-yy.

Feb-22

CurrentDate

Date of report creation as M/d/yyy.

2/1/2022

Duration

Dates of report start and end as MMMM dd - dd, yyyy

July 1 - 31, 2024

FullName

User signature full name (if configured for user)

John Doe

JobTitle

User signature job title (if configured for user)

Quality Supervisor

UserSignature

Image of user signature (if configured for user)

<image>

 

Optional Arguments

Append a pipe | to the requested data to access optional arguments. Arguments are separated with semicolons ;.

  • SampleType

    • For some reports, data is required from another sample type than the target of the report. To pull data in from another type, refer to it by name and put the test name after a colon. If we are pulling in data from Type I-II Clinker and our desired test is fCaO, the form field should be named:

      fCaO|SampleType:Type I-II Clinker

  • Timeframe

    • For the above example, we can shift the timeframe using the 1MonthAgo argument:

      fCaO|SampleType:Type I-II Clinker;Timeframe:1MonthAgo

    • Timeframe options

      • 1MonthAgo - previous calendar month to the most recent sample’s Composite Start date in the selected report timeframe

      • 2MonthsAgo - calendar month before the previous calendar month to the most recent sample’s Composite Start date in the selected report timeframe

  • Format

    • To continue our example, we want to enforce only one place after the decimal:

      fCaO|SampleType:Type I-II Clinker;Timeframe:1MonthAgo;Format:f1

    • Formatting options:

      • f0 to f6 - zero to six decimal places to the right of the decimal point

      • f-1 to f-3 - rounds tens, hundreds, and thousands respectively

    • Special case formatting dates:

      ReportMonthName|Format:MMMM will result in July

      • Valid date formats: MMM-yy, dd/MM/yyyy, d-MMM, M/d/yyyy, yyyy, MMMM dd, yyyy, MMMM, MMMM yyyy

  • Output

    • The default output is to average the values for a given test.

    • Other Output options include: Minimum, Maximum, and Count.

    • To change our example above to use Count:

      fCaO|SampleType:Type I-II Clinker;Timeframe:1MonthAgo;Format:f1;Output:Count

Custom Functions

It’s a big wild world out there, so there are custom functions that can be implemented to fill in gaps. These are per-application and not publicly available.

 

 

Related content

Creating a PDF Template
Creating a PDF Template
More like this
Preconfigured Reports
Preconfigured Reports
More like this
Nomenclature
Nomenclature
More like this
Samples
More like this
Sample Types
Sample Types
More like this