Overview
Printing (or more general: producing output) is done with the help of a so-called Job. A Job prints a stand-alone or Repository based FormLayout with dynamic data provided by JobData.
A Job provides various methods for controlling the output behavior. Among other functions it is possible
Workflow
The basic steps to generate output are as follows:
- Select a FormLayout
- Create JobData
JobData is used to pass dynamic data to a Job.
- Provide data for JobData
The JobData is use to provide values for the DataFields required for the FormLayout to be printed.
Provide data programmatically or instruct JobData to use a DataSource already defined in the FormLayout (e.g. importing data from a CSV file or a ODBC database). See JobDataRecordSet, JobDataCsv, JobDataOdbc, JobDataXml, JobDataDataSource
- Create a Job
The Job class is the main class for printing a FormLayout.
- Assign the JobData to the Job
If no JobData is assigned to a Job, the default data for the FormLayout is used. This default data is identical to the data-set which was used for printing or previewing the FormLayout in the last TFORMer Designer session.
- Adjust the properties of the Job
The most important properties are the output-type and the name of the target device (setOutputName, setPrinterType or setPrinterName). The order in which the properties are set is irrelevant.
- Print the Job
To generate the Job based on the FormLayout and JobData in the required output format use one of the print-methods (print, printToStream, printToStreams) provided by a Job.
More Information