RE: COM problem

Results 1 to 7 of 7

Thread: RE: COM problem

  1. #1
    John McArthur Guest

    Default COM problem

    Brief History <BR>=============<BR>We have an app written in delphi that provides various reports (with a lot of math calculations etc.) We would like to make these reports available over the web. <BR><BR>Therefore we plan to make the app a com server, adding in the necessary interfaces, to call the reports and save them as htm files.<BR><BR>We would like to enter the criteria in an html form, and call run the reports with COM, and load the resulting save html reports.<BR><BR>Current situation<BR>=================<BR>I&#039ve created a test app that saves a report as html, and added in the com interface. However, I&#039m having trouble creating the object in ASP. when I issue the Server.CreateObject("ReportTest.JReportController" ) I get an error.<BR><BR>This is my Code:<BR>&#060;%<BR> server.scripttimeout=600<BR> set ReportConnection=server.CreateObject("ReportTest.J ReportController")<BR> ReportConnection.RunReport <BR> set ReportConnection=nothing<BR> response.redirect "C: emp
    eport.htm"<BR>%&#062;<BR><BR>I get a variety of errors, including:<BR>Error Type: Server object, ASP 0177 (0x800401F3)<BR>Invalid ProgID. For additional information specific to this message please visit the Microsoft Online Support site located at: <BR>/tick/test3.asp, line 3<BR><BR>Can anybody help?<BR>

  2. #2
    Romano Magacho Guest

    Default RE: COM problem

    Try redirecting to a valida URL. I mean you can&#039t redirect to a physical path. You have to map your &#039temp&#039 directory or create a /temp under your current ASP file directory, then call<BR>response.Redirect "./temp/report.htm"<BR>I hope that helps.

  3. #3
    Matt Jacyno Guest

    Default RE: COM problem

    Looks to me like it doesn&#039t like your ProgID (ReportTest.JReportController). Can you give some more information about that object? You say you created an app and then added the COM interface. What&#039s the "app" written in? What COM interfaces does it support? I&#039d expect that you&#039ve written a DLL (as opposed to an EXE) in either VB or VC++. If it&#039s in VC++ make sure you make it an Automation object, not just a run-of-the-mill COM object (IDispatch has to be implemented for ASP to instantiate the object).<BR><BR>Some more info would be most useful.<BR>Matt

  4. #4
    Join Date
    Dec 1969

    Default RE: COM problem

    Instead of pointing to an HTML file created and saved in c:/Temp - which is what appears you are doing, why not have your Object create the HTML and spit it back out to the ASP page? Then, you&#039ll have dynamic reports, rather than creating and saving over reports in c:/Temp.

  5. #5
    John McArthur Guest

    Default RE: COM problem

    OK, The app is written in Delphi 5. It&#039s set up to support IDispatch. It is written as an EXE, The theory is that we have an existing app with all the reports already written, and we will modify it by adding COM interfaces which save the reports in html, which we then pick up. <BR><BR>This is just a test app at the moment, just investigating to see where the problems occur. Not being able to create the COM object seems to be a major problem :)<BR><BR>I&#039ve checked that the progid is in the registry. Any ideas? please?

  6. #6
    sm549 Guest

    Default RE: COM problem

    Did anyone register the exe on the server box? If you run regedit, in the HKEY_CLASSES_ROOT, is there an entry for ReportTest.JReportController? If not, windows won&#039t be able to find it and load the corresponding module. <BR><BR>Not sure about Delphi, but usually you can register an out-of-process server by running with it once with the /regserver switch, for example in a command window on the server box:<BR>&nbsp&nbspc:mydir heexe.exe /regserver<BR><BR>Hope it helps.<BR>

  7. #7
    sm549 Guest

    Default Disregard - I'm idiot

    Sorry, I see you already tried that now that I&#039ve read your post more closely. Good luck.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts