ASP.net - add a Pivot Table

Hi guys,

I'd like to add a Pivot Table to my asp.net (SQL server db) application.
I know that Office Web Component provide this kind of feature.
So I reference OWC11 and I try to add Pivot Table in my toolbox, but It's not appearing...

Thanks
meciabAsked:
Who is Participating?
 
vb_jonasConnect With a Mentor Commented:
No? Actually the same thing happened to me when I tried on my laptop just now. On my other pc it appeared in the toolbox... But I found out that even if it does not appear, I can add it as a control in the code view:

<OBJECT style="Z-INDEX: 101; LEFT: 392px; WIDTH: 502px; POSITION: absolute;  TOP: 144px;       HEIGHT: 217px" height="217" width="502" classid="clsid:0002E55A-0000-0000-C000-000000000046"  VIEWASTEXT>       <PARAM NAME="XMLData" VALUE='<xml xmlns:x="urn:schemas-microsoft-com:office:excel">&#13;&#10;<x:PivotTable>&#13;&#10; <x:OWCVersion>11.0.0.5531 </x:OWCVersion>&#13;&#10;  <x:DisplayScreenTips/>&#13;&#10; <x:CubeProvider>msolap.2</x:CubeProvider>&#13;&#10;  <x:CacheDetails/>&#13;&#10; <x:PivotView>&#13;&#10;  <x:IsNotFiltered/>&#13;&#10; </x:PivotView>&#13;&#10;  </x:PivotTable>&#13;&#10;</xml>'></OBJECT>

(the code is copied from the article above)
0
 
vb_jonasCommented:
Hi, right click the toolbox, choose items...
Select the [COM Components] tab
Check Microsoft.Office.PivotTable 11.0
OK
0
 
vb_jonasCommented:
You can find an article here: http://www.dbazine.com/sql/sql-articles/charran3
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
meciabAuthor Commented:
It's axactly what I've done...
But I cannot find the object in the toolbox! (under wich category should it appaears?)
0
 
meciabAuthor Commented:
Sorry i'm a newbie in asp...
but where must I copy this text?

thx
0
 
vb_jonasCommented:
Click the "Source" tab in the designer. Paste the code somewhere above the last </div></form> tag's.
0
 
meciabAuthor Commented:
ok got it...

But a rectangle with the x appears but there's no propeties accessible
0
 
vb_jonasCommented:
Hi, no you will need to add code to connect the datasource to your pivot, for example (the same article again).

<SCRIPT language=vbscript>
Sub window_onload      

      PSpace.DisplayFieldList = true      
      Dim dc      
      Set dc = dsc.Constants      
      dsc.RecordsetDefs.AddNew "SupportFiles/PivotData.xml",
dc.dscCommandFile, "dscData"      
      PSpace.DataSource = dsc      
      PSpace.DataMember = "dscData"      
      dsc.ConnectionString = "Provider=MSPersist.1"      
      PSpace.CommandText = "PivotData.xml"                        
End Sub
</SCRIPT>
0
 
meciabAuthor Commented:
But there's no way to have a Pivot Table object usable like a Gridview?

Thnx for your help
0
 
vb_jonasCommented:
Hi, not really sorry, MS Pivot Table is a Com object and not an asp.net one.
0
 
meciabAuthor Commented:
Thx for your help
0
 
meciabAuthor Commented:
A last smalll question
Should I had to add other references?
Because word such as "</x:OWCVersion" are underlined.

Thx
0
 
vb_jonasCommented:
Hi, one other object is required to run the sample in the article, <OBJECT id=dsc...

but the underlining shouldn't have anything to do with that. What do you get for help if you place the mouse on the underlined word(s)?

0
 
meciabAuthor Commented:
for example on OBJECT I Have

Warning      2      Validation (XHTML 1.0 Transitional): This name contains uppercase characters, which is not allowed.

on pivottable I have:
Warning      11      Validation (XHTML 1.0 Transitional): Element 'pivottable' is not supported.

thx
0
 
vb_jonasCommented:
Uppercase is not allowed in XHTML 1.0 Tr., but its really only cosmetics, many samples (including MS-ones) uses uppercase in htmlcodes. 'pivottable' is also out of XHTML 1.0 Tr' range. It just doesn't know that kind of syntax.

BUT - I've done some further digging in this toolbox-thing. And it's Vista and OWC11 that has issues. Are you running on a Vista-machine?
0
 
meciabAuthor Commented:
nop XP machine
0
All Courses

From novice to tech pro — start learning today.