Problem calling report using RUNMODAL

fmhigue
Member Posts: 290
I am calling a report using RUNMODAL. The reports runs without a problem actually I am sending the parameters for the report but the only thing is it gets printed automatically.
Is there any way to deactive print option?
Thank you in advance
Is there any way to deactive print option?
Thank you in advance
0
Comments
-
You can prevent printing from Preview by using command CurrReport.Preview. If this function is called in report, you cannot print the report from preview.0
-
I got the code as follow
CLEAR(BackorderByItemReport);
BackorderByItemReport.SetProperties('7400',TRUE,TRUE,TRUE);
BackorderByItemReport.USEREQUESTFORM(FALSE);
BackorderByItemReport.RUNMODAL();
Parameters on SetProperties'
7400 Inventory Posting Group
TRUE Qty on Purchase Order >0
TRUE Create excel file
TRUE Call from another report
So I need to change the actual report I am calling? If I use CurrReport.PREVIEW it will only allow preview but no print. If I hide Request Form it will do the same?0 -
It will disable printing from preview, but not printing directly. You know, reports are there for printing. If you want report which you cannot print, it is something against main functionality of the report... 8)0
-
kine wrote:It will disable printing from preview, but not printing directly. You know, reports are there for printing. If you want report which you cannot print, it is something against main functionality of the report... 8)
Not quite true, there are processing only reports, that run the code and have no sections to print.
Like report 84 Update Analysis Views, this runs the code only, to Update Analysis Views.
fmhigue
Not quite sure what you mean by your post, do you want a print but not automatic, but the report prints because you have this line:
BackorderByItemReport.USEREQUESTFORM(FALSE);
Set this to true for the options form to show, and for user intervention, then your report will not go straight to the printer.
BackorderByItemReport.USEREQUESTFORM(TRUE);
BackorderByItemReport.USEREQUESTFORM(FALSE);
This means the option to print or Preview is not offered, as the requestform is not shown.
DavidAnalyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0 -
Of course...
I mean just reports and not batches... :-)0 -
There is a fundamental flaw in Navision with respect to codeunits & reports.
If reports are/can be used for processing then why have codeunits at all?
Is it because codeunits are not able to produce the user request form so they made reports that can process?
seesh...NAV - Norton Anti Virus
ERP Consultant (not just Navision) & Navision challenger0 -
kine wrote:Of course...
I mean just reports and not batches... :-)
Hey Kamil, I think that what he wants is for the report to open with the Request window showing, so that the user can then decide to print or not. I do not think this is a Batch process.
David's solution is I think the correct one.David Singleton0 -
idiot wrote:There is a fundamental flaw in Navision with respect to codeunits & reports.
If reports are/can be used for processing then why have codeunits at all?
Is it because codeunits are not able to produce the user request form so they made reports that can process?
seesh...
Flaw or Feature, true use a report if you want to give the user request form options, or you do not have codeunits on your licence.
DavidAnalyst Developer with over 17 years Navision, Contract Status - Busy
Mobile: +44(0)7854 842801
Email: david.cox@adeptris.com
Twitter: https://twitter.com/Adeptris
Website: http://www.adeptris.com0 -
It seems I missed the meaning of the question... #-o
But discussion without the person who asked is waste of time... 8)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