Pass the var "pointer" from local record variable to Global record

Hi experts.

Anyone can tell me how to pass a var relation from a local record variable to a global record?

This is the case: I wrote a function on a processing report (let call FilterShipment) SetShipment (Var ShipTemp :Record Shipment), Then I define a global record variable and assign it using the local var variable: ShipmentHeader := ShipTemp, The next step I will change the filter of the global record in the OnPreReport trigger (ShipmentHeader.SETRANGE(“No.”,‘aaaaa’) , then I hope the global record variable can be returned to the caller.

Then I call this function and transfer the var “pointer” from a form call it shipment Card. Below are my partial codes:

FilterShipmentReport.SetShipment(Rec);

FilterShipmentRecord.RUNMODAL;

Clear(FilterShipmentRecord);

It seems I can not get the changed record from the report.

Any suggerstions will be warmly appreciated.

Thanks in advance.

Gary

HI ALL,

I got a solution ,a clumsy ideal.

i.e. there are two forms,let call FormA (caller page), FormB (called page). there are two functions on the FORM B, let call FirstTransferVar ( var shipTemp1 : Record shipment)

shipment.copy(shiptemp1) // shipment is the global variable.

OnPreReport trigger of Formb

IF Shipment.FINDSET Then

shipment.“desc” := “aaaa” //Modify something else of the global variable.

SecondTransferVar(var shipTemp2 : Record shipment)

ShipTemp2.Copy(shipTemp2); //Transfer the modification from global variable to the var. then return to the called in FORM A

In form A.

Formb.FirstTransferVar(…)

FormB.RunModal;

FormB.Secondtransfer;

If someone else has a better solution, warmly appreciated to share with us.

thank you in advance.

GARY