procedure Check;
The Check method scans the document specified in the Docname property of the associated OleanderPrinter. It will try to resolve every identifier it can find. To do this it will try to locate all active datasources on the form it is on and every active datasource specified in the AdditionalSources property.
If the controller can not find the proper datasource and field, it will ask the application with the OnIdentifierCheck event if it will handle this identifier. If the application does not know the identifier either, the controller assumes an error an raises an exception.
Also will be checked:
- If overlapping fields or groups exist
- If there is a datasource to every group
- If the first identifier in the document body is a group
procedure Close;
The Close method closes the OleanderController and the associated OleanderPrinter.
constructor Create(AOwner: TComponent);
The Create method allocates memory to create the component and initializes its data as needed. Each object can have a Create method customized to create that particular kind of object. The owner of the created component is passed in the AOwner parameter.
Usually you don't need to create objects manually. Objects you design in Delphi are automatically created for you when you run the application and destroyed when you close the application.
If you construct a component by calling Create, and give it an owner, the owner disposes of the component when the owner is destroyed. If you don't want another component to own the created component, pass Self in the AOwner parameter.
destructor Destroy;
The Destroy method destroys the object, component, or control and releases the memory allocated to it.
You seldom need to call Destroy. Objects designed with Delphi create and destroy themselves as needed, so you don't have to worry about it. If you construct an object by calling the Create method, you should call Free to release memory and dispose of the object. Free checks to see if the pointer is nil before calling Destroy and is also more efficient in code size.
procedure Open;
The Open method enables the OleanderController. It checks if a valid Datasource and OleanderPrinter are assigned. If so, the OleanderPrinter will be activated, too.
procedure Print (APreview: boolean);
The Print method prints the document specified in the Docname property of the associated OleanderPrinter for every record it finds in the Datasource property. If there are no bookmarks in the Bookmarks property Oleander will loop the dataset specified in the Datasource property from First to EOF. If there are bookmarks, every bookmark will be selected and printed.
Prior to printing, the Check method will be called.
If the APreview parameter is False, the resulting document will be sent to the printer, the original and the resulting document will be freed.
If the APreview parameter is True, the resulting document will not be sent to the printer nor freed. Instead the OLE server will be activated setting the ShowServer property of the associated OleanderPrinter to TRUE. The print method will then return to the calling application for further processing. The resulting document can be printed with a call to the PrintDoc method of the OleanderPrinter.