trigger OnAction(); var locCalculLoyerEntete : Record "Calcul Loyer Entete"; repDCL01FDL : Report "DCL 01 FDL"; begin locCalculLoyerEntete.Reset; locCalculLoyerEntete.SetRange("No.","No."); if locCalculLoyerEntete.FindFirst then begin Clear(repDCL01FDL); repDCL01FDL.SetTableView(locCalculLoyerEntete); repDCL01FDL.setParam("No."); repDCL01FDL.UseRequestPage(true); repDCL01FDL.Run; end;
trigger OnInitReport(); var locCalculLoyerEntete : Record "Calcul Loyer Entete"; begin locCalculLoyerEntete.Reset; locCalculLoyerEntete.SetRange("No.",iNoDCL); if locCalculLoyerEntete.FindFirst then ; Message ('%1',locCalculLoyerEntete."No."); dButoir:=locCalculLoyerEntete."Date Butoir"; end; procedure setParam(pNo:integer) begin iNoDCL:=pNo; Message('Set Param . %1', iNoDCL); end;
Answers
this already tells you that OnInit is run well before your value is set.
I found this schema very useful: