Make a Report Work with Eagle
No Client Callback functions
Client Callback Functions, as Confirm()
, StrMenu()
, Page.Run()
etc.,
are not allowed in reports that are being run in a background session.
Since Eagle is using Job Queue Entries, with background sessions, these kind of
functions must not be invoked when the report is executed.
Note
It is allowed with Client Callback Functions when the Request Page is being shown, since that code is not executed by the Job Queue, but only when the user changes the request parameters.
Tip
If the report can be run in a Job Queue, it is probable that the report does not use any Client Callback Functions, but it is always good to check.
Save all parameters in the request page
Eagle saves the request page data that is returned by the Report.RunRequestPage(Integer [, Text]) Method and executes the report through a Job Queue Entry with that data as its only input parameter.
This means that all parameters that are needed to run the report must be saved in the request page. Data that is saved in any other way, as in a table, will not be available when the report is executed by the Job Queue.
File Management
If the report is creating files, that normally is shown to the user, it is important to use the methods in the File Management codeunit to export the files:
If above methods are being used, the files will be picked up by Eagle and stored in the Queue Entry table.
If a function produces more than one file, by calling above methods more than once, all generated files will picked up by Eagle and saved as Queue Data Entries, connected to the Queue Entry record.
AllowScheduling
If the report property AllowScheduling
is set to false
, the report will still
be available for use in Eagle, but the user will be warned that the report
might not work as intended. It all depends on the reason why the report is not
allowed to be scheduled.