Amyuni SetDocFileProps & Lock
ebsoft
Member Posts: 81
Good morning,
I'm trying to use Amyuni lock & SetDocFileProps methods within NAV 4.0 SP3, the Amyuni version is 4.0.
I would like to avoid use DefaultDirectory, DefaultFilename and SetDefaultPrinter methods because I have many problems in multithread calls.
Here is the code i use:
I've read in the online help of Amyuni that using Lock and SetDocFileProps method instead of DefaultDirectory and DefaultFilename is the only way to avoid problems in multithread.
Here is the Online Help
With this code the printer should take C:\TEST.PDF as filename and it shouldn't prompt me for a filename.
It does not work, because when I run the code, it prompts the user for the filename.
Could you tell me where I am wrong?
Thank you very much.
Federico
I'm trying to use Amyuni lock & SetDocFileProps methods within NAV 4.0 SP3, the Amyuni version is 4.0.
I would like to avoid use DefaultDirectory, DefaultFilename and SetDefaultPrinter methods because I have many problems in multithread calls.
Here is the code i use:
PrinterName := 'Amyuni'; LockName := 'JobScheduler'; FileName := 'C:\TEST.PDF'; PDFConverter.DriverInit(PrinterName); PDFConverter.Lock(LockName); PDFConverter.SetDocFileProps(LockName,3,'',FileName); Report.RUNMODAL..... PDFConverter.Unlock(LockName,1000); PDFConverter.DriverEnd();
I've read in the online help of Amyuni that using Lock and SetDocFileProps method instead of DefaultDirectory and DefaultFilename is the only way to avoid problems in multithread.
Here is the Online Help
With this code the printer should take C:\TEST.PDF as filename and it shouldn't prompt me for a filename.
It does not work, because when I run the code, it prompts the user for the filename.
Could you tell me where I am wrong?
Thank you very much.
Federico
0
Answers
-
ebsoft wrote:PS: You can tag it as solved, thanks!Slawek Guzek
Dynamics NAV, MS SQL Server, Wherescape RED;
PRINCE2 Practitioner - License GR657010572SG
GDPR Certified Data Protection Officer - PECB License DPCDPO1025070-2018-030 -
Hi,
have you ever tried this thing with amyuni 4.5? I have problems with setting the filename in the 4.5 version.
It would be nice if you could post your code.
greetings
Mik
With kind regards
mik0 -
mik wrote:Hi,
have you ever tried this thing with amyuni 4.5? I have problems with setting the filename in the 4.5 version.
It would be nice if you could post your code.
greetings
Mik
Hi, I don't have the solution under my hands now.
I'm working from another customer. But the version I used is not 4.5, I'm sure of this.
The code I used is posted above.0 -
Hi,
thanks for your fast reply. We are stopping the dev. for Amyuni now. There is another good printer we will test in the next month.
With kind regards
mik0 -
mik wrote:Hi,
thanks for your fast reply. We are stopping the dev. for Amyuni now. There is another good printer we will test in the next month.
I'm using PDF Creator since 2009.
It's perfect for us. and free.
But with NAV you should use versione 0.80 -
Hi,
Can you rmember what was the solution? We are having a similiar issue.
Basically the line;
PDFConverter.SetDocFileProps(LockName,3,'',FileName);
...doesn't appear to work. When printing, the dialog box to enter an output file still appears.
Many Thanks.0 -
I solved it myself too.
...
The lockname needs to be the document name that would normally be sent to the print queue by NAV (usually the report's caption).
So, for example, if are printing r205 Order Confirmation to convert to a PDF, you would assign "Order Confirmation" to the "lockname" variable.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