Set options on report requestform via code?

dleroux
Member Posts: 87
Basically, I have a need to batch post Purchase Orders that meet certain critera. I have no problem setting this up in code, but what I need to do is force the report (496) to always set the "Receive" and "Invoice" option on the report to True. (This is something which can not be trusted to the operator)
Basically, what I have now is something like this:
// rptBatchPO is defined as report 496
// POhdr is defined as record for the Purchase Header table
POhdr.RESET;
POhdr.SETFILTER(field1, value1);
POhdr.SETFILTER(field2, value2);
rptBatchPO.SETTABLEVIEW(POhdr);
rptBatchPO.RUNMODAL;
I do not seem to have access to the option values on the request form. Can anyone give me some pointers on how to set these - or tell me if it is "unpossible"?
Thanks in advance
Basically, what I have now is something like this:
// rptBatchPO is defined as report 496
// POhdr is defined as record for the Purchase Header table
POhdr.RESET;
POhdr.SETFILTER(field1, value1);
POhdr.SETFILTER(field2, value2);
rptBatchPO.SETTABLEVIEW(POhdr);
rptBatchPO.RUNMODAL;
I do not seem to have access to the option values on the request form. Can anyone give me some pointers on how to set these - or tell me if it is "unpossible"?
Thanks in advance
0
Comments
-
go to the report using the designer
Vew->Request Form->View C/al Code
OnOpenForm()
ReceiveReq := TRUE;
InvReq := TRUE;
plus any other changes you need.
Maybe Like
"Posting Date" := TODAY;0 -
That should do the trick - I have this great reluctance to modify anything relating to the posting routines which is probably why I did not think of going there. I think I'll make a copy of the report and modify it just to be safe.
Thanks0 -
that will not modify any posting routines. what it will do is place the checks in the boxes so the user doesn't have to - or if they forget.
Works like a charm for us.0
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