Use Current Record

oleschjoeth
Member Posts: 74
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

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
0
Comments
-
Use command
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.0 -
...for that you need a developers license which I unfortunately to do not have at this point. Wouldn't there be a way to pick up the current record from the report?
Thanx0 -
The report is not aware from which record was run unless using suggested solution.
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?®obi
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯0 -
Thank you RobertMo - it works0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions