OnLookupOnPrintReport_OnAfterAddStepForReport
Use this event to
Modify existing step properties for a request page handler
See also:
OnLookupOnPrintReport_OnAddStepsForReport
Description
This event is executed once for every step added by either standard or custom request page handlers.
You may use this event to change any property of the step or hide the step.
Template
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB Report Print Lookup", 'OnLookupOnPrintReport_OnAfterAddStepForReport', '', true, true)]
local procedure MyOnLookupOnPrintReport_OnAfterAddStepForReport(_MobReport: Record "MOB Report"; var _RequestValues: Record "MOB NS Request Element"; _SourceRecRef: RecordRef; var _Step: Record "MOB Steps Element");
begin
end;
Example
// [Example] Change an existing step : Double to the default value of the No of Copies step to apply a label to two sides of each box
[EventSubscriber(ObjectType::Codeunit, Codeunit::"MOB Report Print Lookup", 'OnLookupOnPrintReport_OnAfterAddStepForReport', '', true, true)]
local procedure My01OnLookupOnPrintReport_OnAfterAddStepForReport(_MobReport: Record "MOB Report"; var _RequestValues: Record "MOB NS Request Element"; _SourceRecRef: RecordRef; var _Step: Record "MOB Steps Element");
var
OriginalNoOfCopies: Integer;
begin
// Making sure we only modify the Item Label steps
if (_MobReport."RequestPage Handler" <> _MobReport."RequestPage Handler"::"Item Label") then
exit;
// Double the default value of the NoOfCopies step to apply a label to two sides of the box
if _Step.Get_name() = 'NoOfCopies' then
if evaluate(OriginalNoOfCopies, _Step.Get_defaultValue()) then
_Step.Set_defaultValue(OriginalNoOfCopies * 2);
end;
More examples
-
How-to Create your own RequestPage Handler (Report Print) — Create a custom RequestPage Handler for a Report object for use with Report Print.
A RequestPage Handler is required to print a standard or custom Report Object from the mobile device.
-
How-to Customize Item Label (Report Print) — Modify an existing Report Print standard report, to include more information in the layout and barcode.
Version History
Version | Changes |
---|---|
MOB5.46 | Introduced |