preloader-matrix

Alfasith

Report Method Sequence (Methods in reports) in Dynamic AX

Method
Description
init
Initializes the report and its objects. This is the earliest method that can be overridden among those executed when a report is constructed and run.
Override this method to add initialization tasks, such as the following:
·    Validation of the argument objects received
·    Initialization of supporting classes
·    Dynamic changes to the design
If your changes require access to the objects of the report, add your code after the super() call.
Caution noteCaution
Do not delete the super() call from this method. The super() call initializes all the objects of the report. 
run
Runs the report. This method is executed when the user clicks OK on the preliminary specification dialog box of the report (which enables the user to select where to send the report, and so on).
The default version of this method does the following in the sequence shown:
1.  Calls prompt.
2.  Creates a basic design if it does not already exist.
3.  Arranges the fields.
4.  Calls fetch.
5.  Calls print.
prompt
Prompts the user to select a print medium and other information.
Available mediums include paper, the screen, a print archive, .rtf, HTML, ASCII, .pdf, and text (UTF-8).
To disable the print medium selection, override the method, and then remove the call to super().
Caution noteCaution
Do not mistake this method for the method of the same name on a query.
fetch
Fetches records from the database. The fetch method instantiates a query, opens the query prompt, and then fetches the records.
During the execution of the fetch method, the next and get methods are executed in pairs on the query of the report. The send, the headerand/or footer methods, and the progressInfo method are then executed. The cycle continues with calls to nextget, and so on, until all the data has been fetched.
The following are reasons for overriding the fetch method:
·    The report is not based on a query.
·    Some of the fetched data must be processed (this can also be done on the send method).
·    The report is based on a temporary table.
print
Prints the report to the selected print medium, such as a printer, file, or screen.

Leave a Reply

Your email address will not be published.