FormLayout class

Namespace: TECIT.TFORMer

Provides access to a FormLayout which is referenced by a Repository or available as stand-alone FormLayout.

Usage and notes

Overview

A FormLayout is a document which was created with TFORMer Designer. This class is used to retrieve or set information belonging to a FormLayout.

A typical FormLayout contains static content (like a logo), dynamic content (like a DataField) and a number of properties which are used to describe the FormLayout and its behavior during print-time. Each FormLayout is member of exactly one Project (in the case of a Repository) or the GlobalProject (in the case of a stand-alone FormLayout).

Note

It is not possible to change the appearance of the FormLayout (like adding new elements or bands) through the SDK. Design tasks are supported by TFORMer Designer only.

Repository-based FormLayouts


General

Printing

When printing a specific FormLayout within a Repository 3 parameters must be specified to identify the FormLayout:

Stand-Alone FormLayout

General

Printing

When printing a Job using a stand-alone FormLayout 1 parameter must be specified:

Note

Do not use Job.ProjectName and Job.FormName when using a stand-alone FormLayout!

Determining Used DataFields


To find a data-field by name, use Project.GetDataField. To iterate through the available data-fields, use Project.FirstDataField and DataField.Next. If you want to know, whether the returned DataField is actually used you can use the method FormLayout.GetDataFieldUsage.

Sample

To retrieve the FormLayout object within a stand-alone FormLayout do the following:

  // Retrieve the global Project 
  // A stand-alone FormLayout contains only the global Project, the global Project contains the FormLayout
  Project project = repository.GlobalProject;

  if (project != null)
  {
    Console.Write(project.ToString());

    // Retrieve the first (and only) FormLayout
    FormLayout formlayout = project.FirstFormLayout;
    if (formlayout != null)
    {
      Console.Write(formlayout.ToString());
    }
  }

To retrieve all FormLayout objects within a Repository do the following:

  // Retrieve the first Project 
  Project project = repository.FirstProject;

  while (project != null)
  {
    Console.Write(project.ToString());

    // Retrieve the first FormLayout in this Project
    FormLayout formlayout = project.FirstFormLayout;

    while (formlayout != null)
    {
      Console.Write(formlayout.ToString());

      // Get the next FormLayout in this Project
      formlayout = formlayout.Next;
    }

    // Get the next Project
    project = project.Next;
  } 

Attention

The FormLayout is only valid as long as it is available in the Project. If it is removed from the Project all instances of the FormLayout become invalid immediately.

Note

Thread-safety: A single instance of this class must not be used by different threads.

Base types: IDisposable

Properties

MemberDescription
Commentstring { get; set; }

Gets/Sets the comment for the FormLayout.

Descriptionstring { get; set; }

Gets/Sets the description of the FormLayout.

Filenamestring { get; set; }

Gets/Sets the filename of the FormLayout.

Namestring { get; set; }

Gets/Sets the name of the FormLayout.

NextFormLayout { get; }

Gets the next FormLayout in the Project.

Methods

MemberDescription
Design(string, bool, bool, bool, string)Returns: void

Opens the FormLayout with TFORMer Designer.

Dispose()Returns: void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

GetDataFieldUsage(string)Returns: DataFieldUsage

Retrieves the usage of a specific DataField in a FormLayout.

ToString()override · Returns: string

Returns a string representation of the instance.

Search documentation

Search in
More scopes
Additional scopes

All contents