Report to pdf - again

rmotzer
Member Posts: 11
Hi,
i installed the Amyuni PDF-Converter (Demo) and got the dll registrated. Has anybody already figured out who to set the filename from within a financials report? I'm not too familiar with using automation controllers in financials. And if sombody did already invent the wheel, i would appreciate to spare a little time ;-)
Best Regards,
Richard
i installed the Amyuni PDF-Converter (Demo) and got the dll registrated. Has anybody already figured out who to set the filename from within a financials report? I'm not too familiar with using automation controllers in financials. And if sombody did already invent the wheel, i would appreciate to spare a little time ;-)
Best Regards,
Richard
0
Comments
-
I added the following Code in OnInitReport()
CREATE(Autom);
Autom.DriverInit('PDF Compatible Printer Driver');
Autom.DefaultDirectory('c:\');
Autom.DefaultFileName('test.pdf');
Autom.FileNameOptions := 1+2;
"Autom" is a variable of type Automation, Subtype 'CDIntf'.CDIntf
No error occurs - but the code has no effect. Maybe because the PDF-printer in financials has got another name -> "PDF Compatible Printer Driver,LPT1:" ? HELP !0 -
Don't have the PDF driver nearby for testing at the moment, but if I recall well, you have to call the report (with the printerselection for it set to printing to PDF) from a codeunit if you want to create the PDF file without human interaction (file dialog).
Insert your PDF init code in codeunit, then issue:
REPORT.RUNMODAL("Your Report ID",FALSE, FALSE,"The Record to print");
Success.
John0 -
Hi John,
yep - that did it. Works great. If you ever come around lake constance in germany - I owe you a couple of beers.
Thanx, Richard0 -
You're welcome.
Those beers... that's a promise I'll hold you to <img border="0" title="" alt="" src="images/smiles/icon_smile.gif" />
Germany isn't too far from Holland, so who knows...
John0 -
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by rmotzer:
If you ever come around lake constance in germany - I owe you a couple of beers.<HR></BLOCKQUOTE>
Hi Ric,
I also want to earn a free beer! What can I do for you? Any questions about Excel-Automation for example? :-)
Regards from Switzerland
Marcus
Marcus Fabian
m.fabian@thenet.ch
+41 79 439 78 72With best regards from Switzerland
Marcus Fabian0 -
When it says the CDIntf is the subtype of the automation can you tell me where i can find this? Is it under one of the classes?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