Confused by Amyuni when saving the report to PDF!

cunnycunny Member Posts: 129
Hi all,

I have investgated for few days about creating report to PDF. And I find that there are two general ways to achieving that function but I didn't get through the second one.

First, install a pdf printer to OS just like Adobe PDF, Amyuni,pdf995 ,ect. Then choose the printer for a user in the "Printer Selection" table. For me, I use "Amyuni PDF Converter". Then I get the right report and select the pdf printer "Amyuni PDF Converter". Ater that I use the report.runmodal to print it out as pdf format. The code may be just like below,
// Verify the pdf will be created is the newest one!
IF EXISTS('C:\TEST.pdf') THEN
ERASE('C:\TEST.pdf');
//Select the Sales Invoice 103001.
SHeader.SETRANGE(SHeader."No.",'103001');
//Select the pdf printer 'Amyuni PDF Converter'(Add it to the printer selection table first).
printer.RESET;
printer.SETFILTER(printer."Printer Name",'Amyuni PDF Converter');
//Use the report.runmodal function to print it out( Verify the third parameter is FALSE)
REPORT.RUNMODAL(REPORT::"Sales - Invoice",FALSE,FALSE,SHeader);

It works like a charm! But I still can not explore my second ieadr though I have investigated it for few days.

Second, I want to generate the pdf file without interaction(without the saving path prompting window). And this is different from the first solution.I also want to use the OCX of Amyuni to realize that. I have defined a new variable called pdfMachine @OCX and subtype is "PDFCreactiveX Class". Then I had a deep look into the methods and properties but have not get it through yet! Is pdfMachine.Save(BSTR FileName, FILESAVEOPTIONCONSTANTS SaveOption) the one which I should use to generate the report as pdf format? But I dont know what the second parameter mean? could anybody give me some reference?

Any idear will be highly appreciated!

Best Regards,

Cunny
cunny Lee
MCP - MBS Navision
jle@naviworld.com

Comments

  • rodbernardorodbernardo Member Posts: 34
    Hi there,

    Did you have the solutions?

    I will be very great if you can share, I'm having the same difficulties.


    Regards,


    Rodel
    Rodel Bernardo
    Pressure is an opportunity.
Sign In or Register to comment.