property Additionalsources: TStringlist;
The Additionalsources property containins a list of strings describing datasouces not found on the form the OleanderController is on. An entry in this list has the syntax "formname.datasourcename", where formname specifies the Delphi form to look in and the datasourcename the datasource to use from this form. This allows the application to have datasources prepared on different forms to supply additional data.
Note: The form has to be loaded into the application wether implicitly by Delphi or explicitly with the Create method to be found by Oleander.
procedure TForm1.FormCreate(Sender: TObject); begin OleanderController.AdditionalSources.Clear; OleanderController.AdditionalSources.Add(UserForm.User); OleanderController.AdditionalSources.Add(GlobalForm.GlobalData); end;
property AvailableIdentifiers: TOleanderIdentifiers;
The AvailableIdentifiers property containins the list of identifiers that the OleanderController could print at the current time. The controller fills the list with all printable fields of all active datasources on his own form and from the datasources specified in AdditionalSources.
The list will be compiled only once during one Open/Close cycle.
property Bookmarks: TOleanderBookmarks;
The Bookmarks property can contain valid bookmarks for the Datasource property. If there are no bookmarks available, Oleander will print all records it finds in the assigned the Datasource calling ist First method and looping until it reaches EOF. If you wish to print only one or some of the available records, specify them in the Bookmarks property and Oleander will print them in the order of appearance starting by 0.
Note: The Bookmarks will not be freed by Oleander. You are responsible of disposing them properly. The DbGrid will do this for his SelectedRows property. If you inserted boomarks into the Oleander Bookmarks property with the Dataset.GetBookmark method, you have to free them with the corresponding Dataset.FreeBookmark method;
procedure TForm1.FormCreate(Sender: TObject); begin DbGrid1.options := DbGrid1.options + [dgMultiSelect]; {allow Multiselect in DBGrid} end;procedure TForm1. PrintbuttonClick(Sender: TObject); var i: integer; begin OleanderController.Bookmarks.Clear; for i := 0 to DbGrid1.SelectedRows.Count - 1 do {insert the DbGrid bookmarks} OleanderController.Bookmarks.Add(PString(DbGrid1.SelectedRows.Items[i])); OleanderController.Open; OleanderController.Print(CheckboxPreview.Checked); end;
property DatafieldMap: TStringList;
The DatafieldMap property contains a list of fieldname mapping definitions. The syntax for a fieldname mapping is "DocumentFieldName=DelphiFieldName".
In order to not confront the user designing his document with cryptic database fieldnames, Oleander uses the TField.Displaylabel property as the identifier for a field. If Displaylabel is set by the Delphi programmer to a userfriendly value, it can be used directly by Oleander.
As Oleander identifiers could not handle spaces or special characters in the name (due to limitations in the used OLE server applications), there might be a situation where it is necessary to use a name in the document that varies from the value of the TField.DisplayLabel property.
Insert an entry in the DatafieldMap property, and Oleander will use this mapped value instead.
Note: The values in DatafieldMap will be used while creating the list of available identifiers found in the AvailableIdentifiers property.
procedure TForm1.FormCreate(Sender: TObject); begin with OleanderController1.DatafieldMap do begin Clear; Add(PartDescription=lufPartDescription); {luf -> LookUpField abbreviation} Add(SpeciesNo=Species No); {space in Displaylabel} Add(LengthCm=Length (cm)); {space and special character in Displaylabel} Add(LengthIn=Length_In); {Value of the DbNamesSeparator property in Displaylabel} end; end;
property DatasourceMap: TStringList;
The DatasourceMap property contains a list of datasourcename mapping definitions. The syntax for a datasourcename mapping is "DocumentDatasourceName=DelphiDatasourceName".
Oleander needs the datasourcename in the document identifier to locate the associating datasource on the Delphi form.
In order to not confront the user designing his document with cryptic datasource names, Oleander uses the
entries in the DatasourceMap property to offer userfriendly and recognizable identifiers.
Note: The values in DatasourceMap will be used while creating the list of available identifiers found in the AvailableIdentifiers property.
procedure TForm1.FormCreate(Sender: TObject); begin with OleanderController1.DatasourceMap do begin Clear; Add(Customer=dscCustomer); {dsc -> Datasource abbreviation} Add(Orders=dscOrders;) Add(Items=dscItems); Add(Orderlist=Query1); end; end;
property Format: boolean;
The Format property is a boolean property that indicates if Oleander should use the formating masks perhaps available in the document identifier content. If set to True Oleander will try to format the identifier replace values, if set to False it will print the field values as Delphi gives them (This could result in an implicit formating if so specified in the used Delphi TField).
property Datasource: TDataSource;
The Datasource property specifies the main datasource for group looping and GotoBookmark target.
property OleanderPrinter: TOleanderPrinter;
The OleanderPrinter property specifies the TOleanderPrinter descendant the controller should use to print.
property Version: string;
Read only. The Version property contains the versionnumber of the TOleanderController component.