Reporting on documents in embedded views
Note: The following applies to Integra for Notes 4.1 Build 51 + and is applicable both to reports generated by Integra for Notes and Integra Quick Reports
When attempting to utilise the Integra SmartIcon to generate a report from data contained in an embedded view, Integra for Notes used to only generate data from the current document that you are in. An enhancement was added into Integra for Notes 4.1 build 51 which allows generation of just the data from the current embedded view. Running the standard Smarticon in Integra for Notes build 51 onwards will utilise this new feature.
However, embedded views are usually used to display a sub-set of documents from a view with the determination of that sub-set being according to the Embedded View Category Formula. So that the report generated by Integra reports only on the documents displayed in the embedded view, some changes need to be made to recorded the properties of the Embedded View which are not available programmaticaly through Lotus Notes.
Integra for Notes 4.1 Build 51 introduced a simple interface that will allow you to tell Integra the name of the embedded view end also its displayed category to be used when exporting documents using the Integra SmartIcon and/or Quick Reports.
All that is required is the addition of a (hidden) sub-form to the form which contains the embedded view, with this sub-form containing some Notes Formula in the PostOpen and QueryClose events. The required formula for each event is as follows with the text in red being replaced by the appropriate names for your particular database:
@SetEnvironment( "IntegraEmbeddedView" ; "Name of The Embedded View" );
@SetEnvironment( "IntegraEmbeddedCategory" ; "Category Text or Formula" )
@SetEnvironment("IntegraEmbeddedView";"(Actions by Person Embedded)");
@SetEnvironment( "IntegraEmbeddedView" ; "");
@SetEnvironment( "IntegraEmbeddedCategory" ; "")
If Integra Quick Reports is called via the SmartIcon or with a customised action button, the Quick Reports wizard will look for the existence of the above environment variables and if found, will load the design details of the embedded view, rather then of the view the current document or form has been opened from.
If an existing profile is executed, which uses the option to run on 'selected documents in active view' (again, from the available profile list called by the SmartIcon or a customised action button), Integra will also look for the above mentioned environment variables and will (if found) run the export from the embedded view selecting documents according to the defined category. The option "Export ALL documents if NONE are selected" must NOT be enabled inside the Integra profile.