Contextual reporting on an open document or on selected documents in a view of a database will be available if you do the next:

Create a button in document forms or in views which a contextual reporting could be performed from;
For example, in order to build a report and at the same time export its data to MS Excel, type in the button the code to run the agent (ReportData.CreateRemote&ExportExcel) in Local Replica of the application using Lotus Script:
Dim ss As New NotesSession
ss.GetDatabase( "", "rwizard.nsf" ).GetAgent( "(ReportData.CreateRemote&ExportExcel)" ).Run
and replace rwizard.nsf with file path and file name of a user's Local Replica in relation to data folder of IBM Lotus Notes.
Also you can create a button in the toolbar of IBM Lotus Notes and create agent with the code typed above to have an opportunity to build contextual reports from any place of any database. For the button type the code to run your agent:
@Command( [ToolsRunMacro] ; "YourAgentName" )
Add forms' and views' descriptions of a database for contextual reporting in settings document Path;
Fill the field Documents Form in the section Initial Selection when setting up a data source.

Type of, forms and views list for contextual reporting will be chosen by a user when he is setting up a report structure. A contextual reporting can be done only on documents with the form ( field Form ) that matches either to the first data source in a report structure or to a data source which exists a relation to the first data source from.


Topic links:

Settings documents Path

Setting data source

See also:

Settings for reporting

Application setup