Configurable POD Reports: Difference between revisions

From EPOD
mNo edit summary
(Added details of Images in POD export.)
Line 182: Line 182:
| ECR_INC_IMAGES_IND    || Whether to include images on the viewed report (1) or not (0).
| ECR_INC_IMAGES_IND    || Whether to include images on the viewed report (1) or not (0).
|-
|-
| ECR_EMAIL_IMAGES_IND  || Whether to include images on the PDF report generated for emails (1) or not (0).
| ECR_EMAIL_IMAGES_IND  || Whether to include images on the PDF report generated for emails (1) or not (0). Value 2 means images are required in a split file in the POD production only.
|-
|-
| ECR_INC_PRODUCTS_IND  || Whether Products are included on the report (1) or not (0).
| ECR_INC_PRODUCTS_IND  || Whether Products are included on the report (1) or not (0).

Revision as of 10:27, 2 November 2017

Warning Warning: This is an incomplete guide.

Intro


Overview

The report is reliant on EPOD_CONFIG_REPORT data table. This controls:

  • The report title
  • The HTML of the report, for each of the sections
    • Page header
    • Initial Header
    • Content
      • title row
      • row, indicating columns to be totalled (/T?) and formatted (/F??)
      • empty row
      • total row
    • Final footer
    • Page footer
  • The page-specific styling CSS, for display and printing

Parameters for the number of content lines per page of each type

  • Flags to control whether certain aspects are included in the report:
    • Alt rows - are alternate rows printed with a different format.
    • Inc Products - whether content rows are produced per product or container
    • Inc Cancelled - whether cancelled products or containers are included
    • Inc Images - whether an images page is included
    • Email Images - whether the images page is included when emailing the PDF.
    • PDF Orientation - portrait or landscape


Designing

Data Field Description
ECR_CSS The styling (minified CSS) controlling the general layout and format of each element on the report.
ECR_CSS_PRINT The styling (minified CSS) controlling the additional requirements of layout and format for printing the report.
ECR_PAGE_HEADER HTML for the page header, appearing once at the top of every page.
ECR_INITIAL_HEADER HTML for the initial header, appearing once at the top of the first page only, under the page header.
ECR_CONTENT_TITLE HTML for the title row of the details section of the report.
ECR_CONTENT_ROW HTML for the content row of the details section of the report.
ECR_CONTENT_TOTAL HTML for the summary row (if required) of the details section of the report.
ECR_CONTENT_EMPTY HTML for the empty rows of the details section on each page of the report. If not provided, empty rows will not be generated.
ECR_FINAL_FOOTER HTML for the final footer of the report, produced on the last page only, above the page footer.
ECR_PAGE_FOOTER HTML for the page footer, appearing once at the top of every page.


Embedding Data

All sections are build from the HTML in the sections in the database, replacing data tags ([...]) with real data from a selection of tables.

Tables allowed:

Data Field Description
EPOD_SITE The site, typically the carrier executing the job or the depot.
EPOD_SITE_CUSTOMER The customer address linked to the site ID.
EPOD_LOAD The load on which the job was completed.
EPOD_USER The user that is assigned to the load.
EPOD_VEHICLE The vehicle that is assigned to the load
EPOD_JOB The job itself.
EPOD_JOB_GROUPS The Job Group of the job.
EPOD_JOB_GROUP_CUSTOMER The customer address linked to the job group.
EPOD_CUSTOMER The customer address of the job.
EPOD_JOB_ADDRESS The job address. If not present, this will show the customer address.
EPOD_COLLECTION_JOB The collection job associated to the job selected.
EPOD_COLLECTION_CUSTOMER The customer address of the collection job.
EPOD_COLLECTION_JOB_ADDRESS The job address of the collection job. If not present, this will show the customer address.
EPOD_DELIVERY_JOB The collection job associated to the job selected.
EPOD_DELIVERY_CUSTOMER The customer address of the collection job.
EPOD_DELIVERY_JOB_ADDRESS The job address of the collection job. If not present, this will show the customer address.
EPOD_PRODUCT The products of the job.
EPOD_CONTAINER The containers (items) of the job.
EPOD_SIGNATURE Any pre-job signatures associated to the job.
EPOD_TNC Any pre-job terms and conditions associated to the job.


Example: [EPOD_JOB.EPL_JOB_CODE]


Special formatting is applied to:

  • Date/Time fields have standard OBS formatting applied by default, although this can be overridden by the Format modifier e.g. [table.EPL_DATE/Fdd MMM yyyy] for explicit date formatting.
  • Telephone Numbers - selects the indicated telephone number EPOD_CUSTOMER.EPL_TELEPHONE(0)
  • UDF Fields - selects the UDField from the specified UDF e.g. EPOD_JOB.EPL_UDF_JOBDETS.WEIGHBRIDGE_NO (normal field) or EPOD_JOB.EPL_UDF_JOBDETS.EPOD_JOB.TRAILER_ID (databound field).
  • TNCs - gets the T&Cs (in either format). Fields other than labels (i.e. the basic text) can be removed by EPOD_JOB.EPL_TNCS(N). If UDF TNCs, a specific field can be requested e.g. EPOD_JOB.EPL_TNCS.EMAIL_REQD
  • Signatures - automatically displays as No Image Found.
  • Job Addresses - automatically uses Customer if the job address doesn't exist.
  • Weight fields are automatically formatted correctly with 3 decimal places. This can be overridden with an explicit format.
  • Description fields have new line and returns changes to
    characters.
  • Status and Job Type automatically translate to descriptions. This can be overridden by a pipe-delimited set of descriptions in parenthesis following the field e.g. (Collecting|Delivering|Servicing).


Explicit field data formatting is controlled with a /F modifier - N? - numeric no of digits or C? currency no of digits currently.


Totals are indicated on fields with a /T? modifier, indicating which total this is. They are used with a special data tag [TOT?], identifying the total to use.

These may also be formatted i.e. [TOT0/FN2]

  • Up to 8 totals may be specified in the sections, accessed using 0-7.
  • TOT8 specifies the total product count.
  • TOT9 specifies the total container count.
  • The content section is always calculated first, which means the totals are available in the header and footer sections.


Calculations may be identified as follows: [CALC: ... ], with the fields inside the calculation NOT in square barckets For example:

  • [CALC: EPOD_PRODUCT.EPL_PRODUCT_QTY_ACTUAL * EPOD_PRODUCT.EPL_WEIGHT/FN3]
  • Note: The above is formatting the calculation to 3 decimal places.
  • Warning: You can include parentheses, BUT YOU MUST LEAVE SPACES AROUND THEM. For example:
    • [CALC: EPOD_PRODUCT.EPL_PRODUCT_QTY_ACTUAL * ( EPOD_PRODUCT.EPL_UNIT_PRICE + EPOD_PRODUCT.EPL_UNIT_VAT )/FN3]

Conditional statements are part of Calculations, as follows:

  • [CALC: IIF('EPOD_JOB.EPL_STATUS' = 'X', 'CANCELLED', )]]

Note Note: Everything must be enclosed in strings, as these are substituted for literal values.


  • Barcode printing may be added as in the following example:
  • <img id="barcode"/>

    <script>JsBarcode('#barcode', "[EPOD_JOB.EPL_JOB_CODE]", {height: 40, displayValue: false});</script>
  • You can set many parameters of the barcode being printed - seee the JSBarcode documentation for details


Reason Code Descriptions for the right level of reason code can be accessed directly using [table.EPL_REASON_DESCRIPTION]. Depending on the table selected and the status of the table, the right reason code will be decoded (i.e. JOB, DET or CLA).

No other types are currently supported.

The reason code and description can be returned delimited by "-" using [table.EPL_REASON_DESCRIPTION(Y)].


Setting Up the Report

Settings for the configurable report are stored on EPOD_CONFIG_REPORT and are as follows:

Data Field Description
ECR_NAME The name of the report.
ECR_ROWS_FIRST_PAGE The number of detail rows on the first page of a multi-page report, including the title line.
ECR_MAX_ROWS_SINGLE_PAGE The number of detail rows on a single page report, including the title line.
ECR_ROWS_CONTENT_PAGE The number of detail rows on a (non-first or last) page of a multi-page report.
ECR_ROWS_LAST_PAGE The number of detail rows on the last page of a multi-page report
ECR_ALT_ROWS_IND Whether odd and even detail rows are formatted differently (1) or not (0).
ECR_INC_CANCELLED_IND Controls whether to include cancelled details lines (containers or products) on the report. If set to 0, cancelled lines will not appear on the report in any circumstances. If set to 1, cancelled lines will appear on the report for completed jobs and cancelled jobs. If set to 2, cancelled items will appear on the report only if the job was cancelled. If set to 3, cancelled lines will always appear on the report for complete and cancelled jobs.
ECR_INC_IMAGES_IND Whether to include images on the viewed report (1) or not (0).
ECR_EMAIL_IMAGES_IND Whether to include images on the PDF report generated for emails (1) or not (0). Value 2 means images are required in a split file in the POD production only.
ECR_INC_PRODUCTS_IND Whether Products are included on the report (1) or not (0).
ECR_PDF_ORIENT The orientation of the report: (P)ortrait or (L)andscape.
ECR_CONTENT_SORT The fields on which to sort detail (product or container) records, delimited by commas. For example: "EPOD_CONTAINER:EPL_CONTAINER_PACKAGE_DESC".
ECR_CONTENT_GROUP The fields on which to group detail (product or container) records, delimited by commas. For example: "EPOD_CONTAINER:EPL_CONTAINER_PACKAGE_DESC".


EPOD_LISTS

EPOD_LIST_ITEMS