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?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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
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
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

vb_jonasCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.