Error:Object reference not set to an instance of an object.

Last post 08-08-2003 6:51 AM by monsteria. 5 replies.

Sort Posts:

  • Error:Object reference not set to an instance of an object.

    01-11-2003, 8:08 AM
    • Member
      10 point Member
    • Serf
    • Member since 09-23-2002, 10:58 PM
    • Posts 2
    Hi there,

    I'm a newbee :). What I'm trying to do is to use an Office Web Component in a web App like I did in a Win App. When I drag and drop the ChartSpace object to the web form, window does not generate some code automaticly in the ASPX.vb file; so what I did is copy the similar code like generate automaticly in a Win App (Protected AxChartSpaceData As AxMicrosoft.Office.Interop.OWC.AxChartSpace).
    But when a use the object the first time in : AxChartSpaceData.clear() . I got the error.
    Does some one know how to use the OWC in a WEb App how to set is object step by step?

    I would greatly appreciate any help out there. Thank you.
  • Re: Error:Object reference not set to an instance of an object.

    01-11-2003, 11:17 AM
    • Contributor
      6,278 point Contributor
    • NetProfit
    • Member since 09-23-2002, 11:51 AM
    • Saint John, NB - Canada
    • Posts 1,252

    I don't think that OWC provides a .Net component interface. You might be able to set a COM reference in your project. The other option you have is to use late binding (this requires OPTION STRICT to be off).

    Dim myChartSpace As Object

    myChartSpace = Server.CreateObject("OWC.Chartspace")
    Jamie Kindred, CGA, MCSD
  • Re: Error:Object reference not set to an instance of an object.

    01-21-2003, 8:00 AM
    • Member
      10 point Member
    • Serf
    • Member since 09-23-2002, 10:58 PM
    • Posts 2
    Hi,

    Thanks of your helps. But now that I created the object how can I make the reference to the OWC that I created in my webform? or how can I make the just created OWC visible in my webform?

    Thnaks again,

    Serf
  • Re: Error:Object reference not set to an instance of an object.

    01-21-2003, 8:53 AM
    • Contributor
      6,278 point Contributor
    • NetProfit
    • Member since 09-23-2002, 11:51 AM
    • Saint John, NB - Canada
    • Posts 1,252
    That's a good question. Have you tried adding it to the controls collection of your form, or some other container control? There may be an issue here, since it is not a .Net assembly. Give it a try though.
    Jamie Kindred, CGA, MCSD
  • Re: Error:Object reference not set to an instance of an object.

    03-19-2003, 5:30 PM
    • Member
      65 point Member
    • LPLAZA
    • Member since 08-01-2002, 9:27 AM
    • Gran Canaria ( Canary Islands - Spain )
    • Posts 13
    Go to the "bin" folder of your web application


    1º)Create a file "owc.bat" with this code:

    aximp.exe c:\archivos de programa\archivos comunes\michosoft shared\office web controls\owc10.dll

    (or in english pc find the path to this dll.... ;-)

    2º) you will have several dll's in your bin folder,

    now you can start typing something like this in your code to automate the owc:

    Import namespace owc10
    (...)
    Dim pivottable as New owc10.pivottable


    3º) this same aplies to any activex (dll/ocx) you want to use.

    4º) hope you post me a good example of using pivottable.... I am working with this now to generate reports sending the pivottable.htmldata property to the client.

    good day

    Luis

    ms-help://MS.NETFrameworkSDK.ES/cptools/html/cpgrfwindowsformsactivexcontrolimporteraximpexe.htm


  • Re: Error:Object reference not set to an instance of an object.

    08-08-2003, 6:14 AM
    • Member
      5 point Member
    • monsteria
    • Member since 08-08-2003, 2:05 AM
    • Posts 1
    Hi.

    Please help

    I'm having the same problem.

    When i drag a chartspace onto a app form, vs.net generates the codes and recognise the object.

    However, when i create the object in web form the vs.net treates it as an object. How did you get Vs.Net to recognise OWC10 in web form?

    Cheers

    monsteria
Page 1 of 1 (6 items)