Using a Plug-in to Modify a Report Definition
Plug-in methods are called using one of the elements described in Plug-in Elements and Triggering Events. The element is included in the report, process, or job definition, and its attributes are set to identify the object and method to call. Let's see some examples of these elements in action. Plugin Call elements can be added to any definition and give developers the ability to customize the report definition before or after it's processed, or to modify data retrieved into the report's datalayers. The simple example below shows how this element can be used to call a plug-in that modifies the Application element's Caption attribute in the _Settings definition.
The Plugin Call element is a child of the definition's Root element. It has the following unique attributes:
(Required) Specifies the name of the plug-in file.
For .NET, provide the filename with its .dll file extension. No path information is necessary if the file is located in the _Plugins sub-folder, otherwise provide a fully-qualified path and name. If the dll is not in the _Plugins folder, you have the ability to call plugins within the application directory by setting the path using @Function.AppPhysicalPath~/
Other tokens, such as @Request, @Sessions, and @Constant can also be used to call plugins within the application directory by setting the path.
|Class Type Name||(Required for .NET) Consists of the root namespace + "." + the name of your plug-in class.|
(Required) Specifies the event that triggers the calling of this plug-in. Options include:
LoadDefinition - when the report definition has been loaded, before any Logi engine processing|
FinishHtml - when the HTML response is ready to be sent back to the browser or to a report export processor.
FinishData - when datalayer processing finishes.
|Method||(Required) Specifies the case-sensitive name of the method to be called in your plug-in.|
|Java Plugin Version||(Java only) Specifies which version of the underlying plug-in class to use. Select Version10 here to use the LogiPluginObjects10 class, which has additional methods such as addDebugMessage, replaceTokens and getSettingsDefinition.|
When developing a .NET plug-in in Visual Studio, the root namespace defaults to the project name, but you can set it explicitly in the Projects Properties page in VS.
The class object's CurrentDefinition value is that of the report definition containing the Plugin Call element used to call the plug-in. For example, if a Plugin Call element is placed in the Customers report definition, the CurrentDefinition field contains the string representation of the Customers report definition. The class's Request and Session values have application-wide scope and are not affected by the location of the Plugin Call element.