Pivot Table printing

D

derJan

Hi,

I've tried to implement the printing functionality for an OWC11 Pivot Table
described in the OWC Black Book on page 453
(document.all.pt.Printing.Print()) - but all I've got is a JavaScript-Error
saying that this object does not support this property or method (sorry, this
is a free translation, I get this message in German: "Das Objekt unterstützt
diese Eigenschaft oder Methode nicht: 'Printing')

What's my fault?

Greetings from Germany
Jan
 
V

vapor

Couple of things, javascript is case sensitive. You need to be using the
right OWC object, for instance OWC 9 has no support for this.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
D

derJan

Well, I use OWC 11 - so it should have support for this.
And I can access other PivotTable's Properties, e.g. "DisplayOfficeLogo", so
the path to the Object is right. But "Printing" doesn't work...
 
A

Alvin Bruney [ASP.NET MVP]

How do you create your OWC object in code? Paste the actual code here.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


derJan said:
Well, I use OWC 11 - so it should have support for this.
And I can access other PivotTable's Properties, e.g. "DisplayOfficeLogo",
so
the path to the Object is right. But "Printing" doesn't work...

vapor said:
Couple of things, javascript is case sensitive. You need to be using the
right OWC object, for instance OWC 9 has no support for this.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
D

derJan

The PivotTable is created dynamically with ASP.NET, the resulting Code is
like this:

<form name="MyForm" method="post" action="index.aspx" id="MyForm">
<div id="OWC">
<span id="lblPivotTable">
<object classid="CLSID:0002E55A-0000-0000-C000-000000000046"
id="navigator" width="502" height="230">
<param name="XMLData" value="...">
</object>
</span>
</div>
</form>

I do access this PivotTable with an VBScript - this works:

with document.MyForm.navigator
.DisplayOfficeLogo = False
.DisplayToolbar = True
.DisplayPropertyToolbox = False
.DisplayFieldList = False
.Toolbar.Buttons.Item(26).Visible = False
.Refresh
end with
 
A

Alvin Bruney [ASP.NET MVP]

This version of OWC does not support printing.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
D

derJan

That explains a lot :)

But I thought OWC 11 does support printing?
At least the Pivot Table's Info-Box says "Version 11.0.0.6555".
Which Version (and which CLSID) do I have to use if I want to print?

Alvin Bruney said:
This version of OWC does not support printing.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


derJan said:
The PivotTable is created dynamically with ASP.NET, the resulting Code is
like this:

<form name="MyForm" method="post" action="index.aspx" id="MyForm">
<div id="OWC">
<span id="lblPivotTable">
<object classid="CLSID:0002E55A-0000-0000-C000-000000000046"
id="navigator" width="502" height="230">
<param name="XMLData" value="...">
</object>
</span>
</div>
</form>

I do access this PivotTable with an VBScript - this works:

with document.MyForm.navigator
.DisplayOfficeLogo = False
.DisplayToolbar = True
.DisplayPropertyToolbox = False
.DisplayFieldList = False
.Toolbar.Buttons.Item(26).Visible = False
.Refresh
end with
 
A

Alvin Bruney [MVP]

I'm sorry I fed you bad information (probably explained why you choked on
it.) This is an OWC 11 GUID. It should support print which is why you are
seeing the version 11 DLL. Do this, open a windows forms project and drop
the OWC 11 pivot table onto the form, load some data and use Visual Studio
object inspector to probe the object to see if it supports a print method.
When you find it, use that same method in the javascript. It's the same
object.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99

derJan said:
That explains a lot :)

But I thought OWC 11 does support printing?
At least the Pivot Table's Info-Box says "Version 11.0.0.6555".
Which Version (and which CLSID) do I have to use if I want to print?

Alvin Bruney said:
This version of OWC does not support printing.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99


derJan said:
The PivotTable is created dynamically with ASP.NET, the resulting Code
is
like this:

<form name="MyForm" method="post" action="index.aspx" id="MyForm">
<div id="OWC">
<span id="lblPivotTable">
<object classid="CLSID:0002E55A-0000-0000-C000-000000000046"
id="navigator" width="502" height="230">
<param name="XMLData" value="...">
</object>
</span>
</div>
</form>

I do access this PivotTable with an VBScript - this works:

with document.MyForm.navigator
.DisplayOfficeLogo = False
.DisplayToolbar = True
.DisplayPropertyToolbox = False
.DisplayFieldList = False
.Toolbar.Buttons.Item(26).Visible = False
.Refresh
end with

:

How do you create your OWC object in code? Paste the actual code here.
 
D

derJan

It's very strange, I've done this, but there is no Print-Method...
This is a list of all Properties and Methods that I could see inside the
Microsoft.Office.Interop.Owc11.PivotTable-Class:

ActiveData
ActiveObject
ActiveView
AllowCustomOrdering
AllowDetails
AllowFiltering
AllowGrouping
AllowPropertyToolbox
AsyncOLAP
AutoFit
BackColor
BuildNumber
Commands
CommandText
Connection
ConnectionString
Constants
Copy
DataMember
DataSource
DataSourceName
DisplayAlerts
DisplayDesignTimeUI
DisplayExpandIndicator
DisplayFieldList
DisplayOfficeLogo
DisplayPropertyToolbox
DisplayScreenTips
DisplayToolbar
EditMode
EndEdit
Export
ExportPicture
HasDetails
Height
HTMLData
Hwnd
IsDirty
Left
let_DataSource
MajorVersion
MaxHeight
MaxWidth
MinorVersion
Parent
ProviderType
Refresh
RevisionNumber
RightToLeft
Select
Selection
SelectionType
ShowAbout
ShowContextMenu
ShowHelp
StartEdit
Toolbar
Top
UserMode
Version
ViewOnlyMode
Width
XMLData
 
A

Alvin Bruney [ASP.NET MVP]

Ok here is my final, final answer. Printing is supported by the print htc
file downloadable in the owc toolpack. Printing is supported through the
hosting container but this behavior file shows how to customize the objects
for printing.

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

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 
A

Alvin Bruney [ASP.NET MVP]

eventually we get it right in here.

--

Regards,
Alvin Bruney [MVP ASP.NET]

[Shameless Author plug]
The O.W.C. Black Book, 2nd Edition
Exclusively on www.lulu.com/owc $19.99
 

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