WS using OCX/Excel - "Callback functions are not allowed"

RnRRnR Member Posts: 21
edited 2010-08-23 in NAV Three Tier
Hi,

My webservice is calling a codeunit. Within this codeunit there is a lot of calculations and one of them needs to use the PMT function (Pmt(interest_rate,number_payments,PV,FV,Type)).

I've tried to access this function through an OCX (finsamp) and through Excel automation, and both of them gives med the following error message:

"Callback functions are not allowed"

I've read about Automation here: http://msdn.microsoft.com/en-us/library/ee909565.aspx

Do I really have to create a .Net component which can calculate the pmt and install that on the server? No other way to accomplish this task?

Cheers
Rnr

Comments

  • RnRRnR Member Posts: 21
    I've now created a class library in .net (cs) and registered the component on the 2009 application server.
    Tried to call the calculation within the COM, but same message:Callback functions are not allowed

    Have tried all ClassInterfaceTypes in cs, called the inteface instead of the class ++. Same error message.

    I would be very happy if somebody can point me in the right direction here :)
  • IsakssonMiIsakssonMi Member Posts: 77
    Hi,

    I guess the problem is that the automation is requesting the UI, because Excel automations starts Excel.

    Check out this link: http://msdn.microsoft.com/en-us/library/dd301080.aspx
  • RnRRnR Member Posts: 21
    with some help from wolfram alpha I wrote the calculations in c/al. not pretty...
Sign In or Register to comment.