Ga naar inhoud

Reporting

Service Reporting

Synopsis

Service to prepare printed reports.

Service Data structures

Enumeration TReportType

Possible values for InvoiceReport form: * rptDeliveries: Delivery report (version 1 & 1). * rptDeliveriesyJamberry: Delivery report for Jamberry (version 1 & 2). * rptDeliveries3: Delivery report version 3. * rptReceptions: Receptions report. * rptReceptions2: Receptions report version 2. * rptReturnReport: Return report. * rptWarehouseVolumesWeekly: Warehouse Volumes Weekly report. * rptPackingInvoices: Packing invoices report. * rptDeliveredArticles: Delivered articles report.

Possible values for StockReport form: * rptStockReport: Stock report. * rptStockReport2: Other form of stock report. * rptPopularArticles: List of popular articles. * rptTVShopExport: TV Shop Export.

Enumeration TFilterOperation

Possible values * foEquals (=) * foLargerOrEqual (>=) * foLessOrEqual (<=) * foLarger (>) * foLess (<) * foUnequal (<>) * foLike (LIKE)

Enumeration TReportDataType

Possible values: * rdtString : String (widestring) * rdtInteger : Integer (int64) * rdtDateTimer : TDateTime (RFC 3999 format: 'YYYY"-"MM"-"DD"T"HH":"NN":"SS') * rdtFloat : Float (with dot!) * rdtBoolean : Boolean (0/1) * rdtField : Field name

Record TReportParameter

Fields: * Name (String) The name of the fieldparameter * Value (String) The value of the parameter * DataType (TReportDataType) type of the value.

Array TReportParameterArray

Array of TReportParameter records.

Record TReportFilter

Fields: * FieldName (String) The name of the field/parameter * Value (String) The value of the parameter * DataType (TReportDataType) type of the value. * Operation (TFilterOperation) The operation to perform

Array TReportFilterArray

Array of TReportFilter records.

Record TPrepareReportDescription

Fields: * ReportType (TReportType) type of report to prepare. * Parameters : (TReportParameterArray) Parameters provided to report. * Filters : (TReportFilterArray) Parameters provided to report.

Service Calls

PrepareStandardReport

Prepare a Report declaration:

Function PrepareStandardReport(aDescription : TPrepareReportDescription) : Integer;
The function prepares the standard report. See the reports section for a detailed description per report. Depending on the type of report, the function returns -1 or an ID of a report job.

CleanStandardReport

Remove temporary report data. declaration:

Procedure CleanStandardReport(aType : TReportType; aJobID : Integer);
Deletes data for the job ID in the report job tables. If aJobID equals -1, nothing is done, the call exits silently.

Database Tables

PrintStock

Used in printing stock reports. Has the following fields:

Name Type Size Description
RecordID INT AutoIncremental,
JOBID INT Job ID
ID INT article ID
SUPPLIER VARCHAR 50 Supplier code
ARTCODE VARCHAR 50 Article code
STOCKCODE VARCHAR 50 Stock code
LOCATION VARCHAR 50 Location in stock
LOTNO VARCHAR 50 Lot number
QTYIN Double Quantity incoming
QTYOUT Double Quantity outgoing
QTYSTOCK Double Quantity in stock
DateSTOCK DateTime Depends on report

Reports

  1. StockReport
  2. PopularArticles