OnLookupOnPrintReport_OnAddStepsForReport

Use this event to

Add steps to a new or existing request page handler


See also: 

OnLookupOnPrintReport_OnAfterAddStepForReport

Description

This event is executed once per mobile report.

You may use this event to add steps shown to the user on the mobile device.

The mobile report will not be shown to the user unless steps has been added.

Template

    [EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB Report Print Lookup", 'OnLookupOnPrintReport_OnAddStepsForReport', '', true, true)]
    local procedure MyOnLookupOnPrintReport_OnAddStepsForReport(_MobReport: Record "MOB Report"; var _RequestValues: Record "MOB NS Request Element"; _SourceRecRef: RecordRef; var _Steps: Record "MOB Steps Element"; var _IsHandled: Boolean)
    begin
    end;
 Click here for parameters...
  • _MobReport 
    • The mobile report to handle. The record can i.e. be used to see the report number and which request page handler the mobile report is to be handled by.
  • _RequestValues
    • The request values with header values and context values. This is both used to determine if the request page handler should show a related mobile report in a given situation and which steps the user needs to go through.
  • _SourceRecRef: 
    • A RecordRef to the context the print is called from, if available. 
    • I.e. Sales Order Line, Warehouse Receipt Line, Purchase Order Return Line, Warehouse Activity(Pick, Put-away) etc.
  • _Steps:
    • The steps you want to collect. Even when the report is not to be shown you will need to set _IsHandled=true as you otherwise will get an error because of a missing request page handler. You will always need to add at least one visible step even when the report does not need to collect any value from the user. You could i.e. use an information step summarizing what will be printed.
  • _IsHandled: 
    • Specify if the mobile report is handled by the request page handler and can be used to determine if another handler already handled the report. Several request page handlers can handle the same report. The steps from each report handler will be added to the total list of steps.

Example: How-to Create your own RequestPage Handler (Report Print)


More examples


Version History

VersionChanges
MOB5.46Introduced