Call web service and get automation error from PDFCreator

sarphervizsarpherviz Member Posts: 5
edited 2014-03-19 in NAV Three Tier
Hi

I'm open a codeunit as a web service and call it from .net. All the codes run successfully but one function call a report and mail it as PDF using PDFCreator and i'm getting an automation error.

This message is for C/AL programmers: Unable to create an instance of Automation Server {2A38400B-87E2-4398-A128-FE39E29FEFF3} with CLSID = 2a38400b-87e2-4398-a128-fe39e29feff3 Retrieving the COM class factory for component with CLSID {2A38400B-87E2-4398-A128-FE39E29FEFF3} failed due to the following error: 80040154..

When i search my computer registry records , i found that PDFCreator contains {2A38400B-87E2-4398-A128-FE39E29FEFF3} clsid.

Could someone help me.

Comments

  • ara3nara3n Member Posts: 9,256
    what version are you on?

    I suggest that you create the RDLC for the report and don't use PDFCreator.

    Instead change the code to just call the report

    Report.SAVEASPDF(Number, FileName[, Record])
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • sarphervizsarpherviz Member Posts: 5
    NAV 2009 R2

    I solve this problem.

    This was because of PDFCreator version was wrong on server. I remove and reinstall the correct version this error solved.

    But now i'm getting another error..

    "Client callback (such as showing Pages) is not supported when executing custom Web services."

    I run a report and create pdf but i couldn't achive that problem..
  • geordiegeordie Member Posts: 655
    sarpherviz wrote:
    "Client callback (such as showing Pages) is not supported when executing custom Web services."

    Usually this error pops up when a process published as web webservice requires some sort of user interaction: please check if running it manually it needs some input/confirmation to be done and, if so, try to avoid it.
  • yukonyukon Member Posts: 361
    sarpherviz wrote:
    NAV 2009 R2

    I solve this problem.

    This was because of PDFCreator version was wrong on server. I remove and reinstall the correct version this error solved.

    Interesting ..! Which version do you use?

    Do you hide request page/form when you print the report if your report have the request form/page? If not you should hide it when you run the report.
    - OnInit
    CurrReport.USEREQUESTFORM(GUIALLOWED)
    

    Regards,
    Yukon
    Make Simple & Easy
  • mdPartnerNLmdPartnerNL Member Posts: 802
    ara3n wrote:
    what version are you on?

    I suggest that you create the RDLC for the report and don't use PDFCreator.

    Instead change the code to just call the report

    Report.SAVEASPDF(Number, FileName[, Record])

    Looks to be the best option but how to merge this pdf with a pdf file/page in where the logo and footers are set?
Sign In or Register to comment.