TFORMer SDK - NET
8
|
Provides access to a user-defined DataSource, which is defined in the FormLayout or a Repository. More...
Public Member Functions | |
JobDataDataSource () | |
Constructor for JobDataDataSource. | |
JobDataDataSource (string name) | |
Constructor for JobDataDataSource. | |
Properties | |
bool | HandleEscapeSequences [get, set] |
Gets/Sets a flag indicating whether escape sequences in DataField values like \n or \x40 should be translated by TFORMer SDK. | |
string | Name [get, set] |
Gets/Sets the name of the DataSource. | |
Dictionary< string, string > | ParameterValues [get, set] |
Gets/Sets the values for DataSourceParameters. | |
bool | ReuseValues [get, set] |
Gets/Sets a flag indicating whether DataField values should be reused in consecutive Records. |
Provides access to a user-defined DataSource, which is defined in the FormLayout or a Repository.
The JobDataDataSource enables TFORMer SDK to use a DataSource defined as part of a FormLayout as JobData for printing a Job.
The creator of a FormLayout is able to define such a DataSource with TFORMer Designer. This DataSource definition is stored as part of the FormLayout and is identified by a unique name. It defines how data is retrieved (e.g. from an ODBC database), the field-mappings and optional DataSourceParameters.
If you specify no or an empty name when using the JobDataDataSource, TFORMer SDK uses the default DataSource specified in the FormLayout. The default JobDataDataSource stores the DataField values used during the last TFORMer Designer session (for this purpose TFORMer Designer maintains an extra file with the extension .xml). If no file with default data exists TFORMer SDK produces no output.
The optional DataSourceParameters may be used to control certain aspects of the JobDataDataSource (like file names, SQL SELECT statement or an ODBC-DSN) during runtime.
Sample tff has no datasource (remove Sample?) move it to samples ? The following sample will use a predefined DataSource. Set one DataSourceParameter and send the output to the default printer.
// Create a new Job instance Job printJob = new Job(); // Select the stand-alone FormLayout named (6) Samples_Picking List.tff // This FormLayout is usually installed as part of TFORMer in // - Windows Vista or later: C:/Program Data/TEC-IT/TFORMer/8/Templates // - Older versions of Microsoft Windows: C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/8/Templates printJob.RepositoryName = "C:/Documents and Settings/All Users/Application Data/TEC-IT/TFORMer/8/Templates/(6) Samples_Picking List.tff"; // Create a new JobData instance using the DataSource named "ODBC" defined inside the Formlayout JobDataDataSource jobData = new JobDataDataSource("ODBC"); // Specify any DataSourceParameters jobData.ParameterValues.Add ("PickingListParameter", "2"); // Assign the JobData to the Job printJob.JobData = jobData; // Select PDF output to /temp/out.pdf printJob.OutputName = "/temp/out.pdf"; printJob.PrinterType = PrinterType.PdfFile; // Generate output based on the FormLayout and the JobData printJob.Print();
For a general description see JobData.
Constructor for JobDataDataSource.
Initializes a new instance of JobDataDataSource class.
JobDataDataSource | ( | string | name | ) |
Constructor for JobDataDataSource.
Initializes a new instance of JobDataDataSource class.
name | The name of the DataSource in the FormLayout or in the Repository |
bool HandleEscapeSequences [get, set, inherited] |
Gets/Sets a flag indicating whether escape sequences in DataField values like \n or \x40 should be translated by TFORMer SDK.
true
if escape sequences in DataField values are translatedstring Name [get, set] |
Gets/Sets the name of the DataSource.
If no name or an empty string was specified, then TFORMer SDK uses the default DataSource.
Dictionary<string, string> ParameterValues [get, set] |
Gets/Sets the values for DataSourceParameters.
bool ReuseValues [get, set, inherited] |
© 2006-2024 - all rights reserved by TEC-IT Datenverarbeitung GmbH |
![]() |
Generated on Wed Aug 7 2024 17:29:42 for TFORMer SDK - NET with doxygen 1.7.6.1 |