Report to pdf - again

rmotzerrmotzer Member Posts: 11
edited 2007-12-03 in Navision Financials
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

Comments

  • rmotzerrmotzer Member Posts: 11
    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 !
  • John_TegelaarJohn_Tegelaar Member Posts: 159
    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.

    John
  • rmotzerrmotzer Member Posts: 11
    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, Richard
  • John_TegelaarJohn_Tegelaar Member Posts: 159
    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...

    John
  • mfabianmfabian Member Posts: 187
    <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 72
    With best regards from Switzerland

    Marcus Fabian
  • ricky76ricky76 Member Posts: 204
    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?
Sign In or Register to comment.