ERRCODE TFormer_SetRepositoryName ( HTFORM  pInstance,
LPCSTR  pszFileName 
)

Sets the filename of the Repository or the stand-alone FormLayout.

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 File name of the Repository or the stand-alone FormLayout
Remarks:
Use this function to provide either the .tfr (TFORMer Repository), or the .tff (TFORMer stand-alone FormLayout) file which should be used. If you provide a .tfr (Repository) file, then you must provide the Project and FormLayout name afterwards by using TFormer_SetProjectName and TFormer_SetFormName.

You can also specify a ZIP file or a BASE64 encoded string in pszFileName (for details see TecUnzipper_Alloc).
Repository based FormLayouts:
A Repository is a data-structure which references an arbitrary number of FormLayout-objects. User-defined Project-objects are used to divide a Repository into logical areas. Each FormLayout referenced from within a Repository is a member of exactly one Project. DataFields defined within a Project are only usable by FormLayouts which are member of this Project. The so-called GlobalProject is allocated by default and is exclusively used to define DataFields which are available for all FormLayouts (regardless of their actual Project-membership). It can not store references to a FormLayout. The Repository also stores JobTrayControl-objects. They may be used whenever printing any FormLayout referenced by this Repository (see TFormer_SetJobTrayControlName). When printing a specific FormLayout within a Repository 3 parameters must be specified to identify the FormLayout:

Stand-alone FormLayouts:
A stand-alone FormLayout can be used on its own. It can be imagined like a very simple type of Repository which contains exactly one GlobalProject which stores the DataField-definitions as well as the FormLayout itself. A stand-alone FormLayout is not able to share DataField-definitions with other FormLayouts and can not contain user-defined Project-objects. The stand-alone FormLayout also stores JobTrayControl-objects. They may be used whenever printing this FormLayout (see TFormer_SetJobTrayControlName). When printing a Job using a stand-alone FormLayout 1 parameter must be specified:

Note:
A Repository or a Stand-alone form 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. When using this method to pass a stand-alone form this form must not use embedded images.
  • 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. When zipping a repository take care to zip all subdirectories as well. When zipping a stand-alone form take care to include required image files.

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.
All cached data as well as the actual Project and FormLayout are discarded when calling this function.

See also:
TFormer_SetProjectName, TFormer_SetFormName.


© 2006-2009 - all rights reserved by TEC-IT Datenverarbeitung GmbH
Generated on Wed Sep 2 16:01:09 2009 for TFORMer Runtime DLL/Shared Library with doxygen 1.5.8