Challenge | Solution |
Dialog box to allow capturing of filtering conditions
When running a report, present the user with a dialog box which allows selection of the filtering conditions for the report. For instance, allow entry of a date range and region which will determine that the report will only include data related to the selected region and date range entered by the user. | Place the code to launch the dialog box and capture the required filtering data within the CB_INITIALISE event. Then, as each Notes document is read, check whether the data meets the filtering condition in the CB_BFORREADNOTES event.
see FAQ with example code |
Challenge | Solution |
Export data from parent & response documents
When generating a report of help desk incidents, each incident is contained in an individual Notes document. Response documents may be created per incident identifying each block of time spent on that incident by various staff.
The challenge is to generate a report to Excel of incidents for a given month which includes the total time spent on each incident taken as the total of the response documents). | The CB_BFORWRITECOM event is called immediately prior to Integra writing the data to the next row in Excel or the next document in Word. This event is executed per Notes document being exported.
Place the code to loop through any available response documents for the currently selected Notes document and calculate the total time on each response document.
see FAQ with example code |
Challenge | Solution |
Report on Notes data as well as back-end database
Generate a report from a sales orders database of unfulfilled sales orders which includes the current balance on the customer's account taken from a back-end database such as SQL, SAP, DB2, Oracle, Access etc. | Place the LotusScript code which fires off the query to the back-end database to access the customer balance in the CB_BFORWRITECOM event. This is executed after having read the data from each of the Notes documents being exported.
As the most performing way of firing such a query may involve using a Connector library (e.g. the Lotus Oracle Connector), this can be included in the CB_INITIALISE event.
see FAQ with example code |
Challenge | Solution |
Generate report across current and archive database
A help desk application contains all help desk incidents for the current month in the "Current" replica and moves all closed tickets as a part of a month end process to the "Archive" replica of the database.
A report is required of all tickets related to a customer for a data range and requires data from both the current and the archive database. | Start reportingfrom the current database then use the CB_AFTERWRITECOM event, which is executed immediately after writing each row to Excel or document to Word, to test whether you have exhausted all the documents for your customer in the current database. If so, reset the database from which the reporting occurs to the archive database
see FAQ with example code |