Currreport.QUIT

Belias
Member Posts: 2,998
I'm using quit function after prompting the user to continue or abort the execution of the report
BTW, nothing is printed.
I read the help but this thing is not mentioned (I think nav continues executing the onprereport trigger and after that aborts the execution)
Can anyone explain this to me?
Thanks in advance...
If not confirm(text) then currreport.quitI wrote this code in the onprereport trigger but appears that nav continue the execution anyway...(e. g. it opens a dialogbox)
BTW, nothing is printed.
I read the help but this thing is not mentioned (I think nav continues executing the onprereport trigger and after that aborts the execution)
Can anyone explain this to me?
Thanks in advance...
0
Comments
-
Why not use ERROR function to abort execution of the code depending user's chice. You can place this in OnPreReport trigger:
If not confirm(text) then ERROR('You cannot continue!');
//Bogdan0 -
Just out of curiosity, I made a small test on a report and put in OnPreReport (after this there were other code lines in OnPreReport):
IF NOT CONFIRM('Continue?',TRUE) THEN CurrReport.QUIT;
I set a breakpoint and ran the report. If I choose "No" on the above, the report kept on processing the code after the above but stopped when having finished OnPreReport trigger.//Bogdan0 -
Note that if you want to close a report without showing the request form, you could use the following code in OnInitReport:
(This is related to the posts above, although I realise that those are about closing the report *after* the request form has run.)CurrReport.USEREQUESTFORM := FALSE; CurrReport.QUIT;
For some reason, CurrReport.QUIT on its own doesn't work, and RequestOptionsForm.CLOSE also doesn't seem to have any effect.
See also my post at http://www.mibuso.com/forum/viewtopic.php?f=5&t=29159Alastair Farrugia0
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