Sets a XML file in internal TFORMer format as DataSource.
- Returns:
- - ErrOk (0) in case of success
- Non-zero if error occurred
- Parameters:
-
[in] | pInstance | The TFORMer-Instance provided by a previous call to TFormer_Init. |
[in] | pszFileName | Data File Name (in internal TFORMer XML format) |
This function enables
TFORMer Runtime to use XML-files (in a format which is used internally by
TFORMer) as a DataSource for printing a Job. The specified XML-file must comply to the formats recognized by
TFORMer. The following XML formats can be used:
- Note:
- Behavior if no input data was supplied: If no DataSource was specified (either by TFormer_SetXXXDataFile, TFormer_SetODBCData or via TFormer_NewRecord and TFormer_SetVarValue) the default data-file (located in the same directory as the FormLayout itself and generated by the last TFORMer Designer session) is used. If this default data-file does not exists no output will be produced. The name of the default data-file is
path/FormName.xml
.
A data file may be passed in the following ways:
- Specify the filename directly.
- Specify the filename of a ZIP-file (e.g. with WinZip) containing the required file.
- BASE64-encode the content of the required file (see Convert class of .NET) and use this string instead of a filename.
- BASE64-encode the content of a ZIP-file (see Convert class of .NET) containing the required file(s). Use this string instead of a filename.
- Note:
- BASE64 encoded strings must start with the sequence
BASE64:
. When passing a zipped file TFORMer expects a real WinZip compatible format. A zipped stream is not suitable! For more details please refer to the TFORMer Runtime DLL Programming Reference.
Must be called before TFormer_Print. When using a Repository-based FormLayout call this function after TFormer_SetFormName, if using a stand-alone FormLayout (*.tff) then call this function after TFormer_SetRepositoryName.
- See also:
- TFormer_SetRepositoryName, TFormer_SetFormName.