Hello
I guess this is a simple question if one knows "how-to"! But in the very old Navision (3.56 DOS) there was a function called "GetCurrentRec" meaning get the current record for further processing.
On a form I have created a button calling a report. I want this report to pick up the current record from the form and perform some processing on the record and terminate with a print.
- how do I do that in Attain?
All help appriciated
Regards, Ole
Comments
REPORT.RUN("Report ID",ReqWindow,SystemPrinter,CurrentRecord) in Button.OnPush().
ReqWindow and SystemPrinter are Boolean and means to show Request Window before printing and to tell whether you want to use Standard Printer or to choos from a list of available printers.
Thanx
I see you are looking for properties that can be set when runing a form.
You can make a new form based on same table (without any controls)and run it on your button instead of your report (set RunFormOnRec=Yes).
I hope you can write code on your forms ? It should look like:
OnOpenForm()
CurrForm.VISIBLE(FALSE);
Rec.SETRANGE("No.","No.");
REPORT.RUNMODAL(55555,TRUE,TRUE,Rec);
CurrForm.CLOSE;
this trick actually runs your form (on which I assume you can write code) and in its code you are using previous solution. you never see the form itself...
and you are using one form more... is it cheaper than ask your NSC to do this for you?
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯