Additional Options for Data Binding

There are different events you can use for influencing the process for data binding of the component. The table provides an overview:

Event

Description

AutoDefineNewPage

The event is invoked for each new page and allows additional variables to be registered for this page. The property IsDesignMode of the event arguments indicates whether design mode is being used.

AutoDefineNewLine

This event is invoked for each new line, before the data-bound fields are registered automatically. In the same was as you do with AutoDefineNewPage, you can register additional fields here.

AutoDefineVariable

This event is invoked for each variable that is automatically created using data binding. Using the Name and Value properties of the event arguments, you can manipulate the names and content of each individual variable before passing it for printing.

AutoDefineField

Analogous to AutoDefineVariable for fields

AutoDefineTable

This event is invoked for each table that has been registered via LlDbAddTable(). You can suppress passing.

AutoDefineTableSortOrder

This event is invoked for each sort order that has been registered via LlDbAddTableSortOrder(). You can suppress passing.

AutoDefineTableRelation

This event is invoked for each DataRelation that has been registered via LlDbAddTableRelation(). You can suppress passing.

 

Please note that when using these events, you must cast the sender object to the respective component types if you want to work with the triggering component instance. Otherwise, you may encounter problems with DrillDown or the preview in the Designer.

Example:

procedure TForm1.DBL29_1AutoDefineNewPage(Sender: TObject;

  IsDesignMode: Boolean);

begin

  (sender as TDBL29_).LlDefineVariable('MyCustomVariableName', 'MyCustomVariableValue');

end;