Object Required error

C

ClevelandSteve

Hello everyone,

I am very new to ASP.net (1.1 framework) and OWC so I'm looking for a
little help. I have an OWC11 PivotTable embedded into my web page.
I'm trying to use VBScript to edit the look of the pivot table so my
users do not have to do it manually. Here is some of my code:

<HTML>
Some Code
<OBJECT id="ptFcst"
classid="clsid:0002E55A-0000-0000-C000-000000000046" Blah, blah...
</OBJECT>
More Code
<SCRIPT language="vbscript">
<! - -
Sub Window_OnLoad()
ptFcst.ActiveView.ColumnAxis.InsertFieldSet
ptFcst.ActiveView.FieldSets("MONTH_TEXT")
End Sub
//-->
</SCRIPT>
</HTML>

When running the code the pivot table appears, but the field set is not
added to the column axis. Turning on the notifications for script
errors within IE returns an Object Required: 'ptFcst' message. Am
I on the right track in thinking the client side script doesn't
recognize the server side pivot table object? I read in another thread
to add a project reference to OWC11, which I did but that didn't
help.
 
C

ClevelandSteve

Alvin,

I copied what was in that MSDN article, but I get the same script
error, Object Required: 'ptHcaMth'. Here is my current code
snippet:

<OBJECT id="ptHcaMth"
classid="clsid:0002E55A-0000-0000-C000-000000000046"
<x:ConnectionString> ...the string
</OBJECT>
</form>
<script language="vbscript">
Sub Window_OnLoad()
Dim ptView
Set ptView = ptHcaMth.ActiveView
ptView.RowAxis.InsertFieldSet ptView.FieldSets("ITEM_NUMBER")
End Sub
</script>

I have your book, but learning OWC and ASP.Net can get confusing at
times.
 
A

Alvin Bruney - ASP.NET MVP

re-register your owc component at a command prompt to see if that fixes your
problem. It may be a registration issue.

--
Warm Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The Microsoft Office Web Components Black Book with .NET
Now Available @ www.lulu.com/owc
Professional VSTO 2005 - Wrox/Wiley 2006
Blog: http://msmvps.com/blogs/Alvin/
 
C

ClevelandSteve

Nope, I even tried removing and reinstalling OWC11 and that didn't
work either. This is getting frustrating.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top