IJob interface
Library: TFORMer9Lib
This is the main class of TFORMer SDK for generating output.
Usage and notes
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
to select the target device and the required output format (Printing and Export),
set Job options (Print Options),
and to select a specific configuration file (TFORMer.XML Configuration File).
Workflow
The basic steps to generate output are as follows:
Create a IJob
The Job class is the main class for printing a FormLayout.Create IJobData
A JobData is used to pass data to a Job.
If no JobData is assigned to a new Job, TFORMer SDK uses the DataSource selected in the FormLayout. If no source is selected, or the special_Default_source is selected, it uses the saved data in the layout's companion .xml file. See JobDataDataSource.Provide data for the IJobData
JobDataRecordSet, JobDataCsv, JobDataOdbc, JobDataXml
Provide data programmatically or connect the JobData with a file or a database. The JobData is responsible to provide values for the DataField required for the FormLayout to be printed.Adjust the properties of the IJob
The most important properties are the output-type and the name of the target device (OutputName, PrinterType or PrinterName). 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 (PrintForm, PrintToStream, PrintToStreams) provided by a Job.
More Information
JobData
Base class for JobData
Note
Thread-safety: A single instance of this class must not be used by different threads.
Inheritance and related types
Base types: IDispatch
Properties
| Member | Description |
|---|---|
| ConfigFile | Gets/Sets the current configuration file for TFORMer SDK. |
| FormName | Gets/Sets the name of the Repository-based FormLayout for this Job. |
| FromPage | Gets/Sets the first page-number to be printed. |
| JobTrayControlName | Gets/Sets the name of the JobTrayControl to be used for this Job. |
| NumberOfCopies | Gets/Sets the number of copies to be printed. |
| Options | Gets/Sets additional options for printing and output creation. |
| OutputName | Gets/Sets the name of the output file or the name of the spool-job (on Microsoft Windows printers). |
| PrinterName | Gets/Sets the name of the output device (file or printer). |
| PrinterType | Gets/Sets the type of the generated output. |
| PrintResultType | Gets/Sets the type of data that should be gathered, while printing. |
| ProjectName | Gets/Sets the name of the Project for printing a Repository-based FormLayout. |
| RepositoryName | Gets/Sets the filename of the Repository or the filename of the stand-alone FormLayout for this Job. |
| StartColumn | Gets/Sets the column-number of the first label to be printed. |
| StartRow | Gets/Sets the row-number of the first label to be printed. |
| ToPage | Gets/Sets the last page number to be printed. |
Methods
| Member | Description |
|---|---|
| GetPrintResult(DataFormat) | Gets the data of the last print operation in specified format. |
| NewJobDataCsv(String) | Creates a new JobDataCsv. |
| NewJobDataDataSource(String) | Creates a new JobDataDataSource. |
| NewJobDataOdbc(String, String, String, String) | Creates a new JobDataOdbc. |
| NewJobDataRecordSet() | Creates a new JobDataRecordSet. |
| NewJobDataXml(String) | Creates a new JobDataXml. |
| PrintForm() | Prints the Job using the selected FormLayout and the current JobData. |
| PrintToStream() | Print the current Job using the selected FormLayout and current JobData. |
| PrintToStreams() | Print the current Job using the selected FormLayout and current JobData. |
| SaveXml(String) | Saves the JobData used for printing a Job as XML file. |
| StreamData() | Gets the current chunk of stream data. |