OWC11 with Vb.Net

R

raj

Hi,

Appreciate if anybody can post the sample code for the vb.net web
application using OWC11 component (not using OLAP). I am not able to find the
samples anywhere. Here is my case

I need to pull the data from SQL Server 2005 and display on the webpage
using OWC11 component. And design the Pivot table like rows, column, filters.

Open the Excel file and Save as Webpage is definetly not my solution.

Thanks in advance
 
R

raj

Surprised not to see any reply even after 6 days. Can somebody help me out plz

Regards,
 
A

Alvin Bruney [ASP.NET MVP]

google this newsgroup, over the years, there are several hundred snippets
that you can use to do what you want.

--
Regards,
Alvin Bruney

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc
 
R

raj

Alvin,

Thanks for the reply. Actually I found couple of the snippets at msdn but
when I use the OWC code behind with sql server (no OLAP) I could able to
generate the pivot table but its not interactiv mode. Can you suggest me any
samples.

Thanks for the help.

Regards,
 
R

raj

Yes, I am talking about the Pivot Table itself. Here is the code I am using
to display the pivot table (static ) but I need to generate the dynamic pivot
table with the similar code.

Dim pivotTable1 As New Microsoft.Office.Interop.Owc11.PivotTable

' Creates connection to Northwind and Customers table.
pivotTable1.ConnectionString = "SQL Server Connection String"
pivotTable1.DataMember = "Table Name"


' Automatically populates the PivotTable Component.
pivotTable1.ActiveView.AutoLayout()

'With pivotTable1.ActiveView
' .FilterAxis.InsertFieldSet.FieldSets("Country")
' .RowAxis.InsertFieldSet.FieldSets("Region")
' .DataAxis.InsertFieldSet.FieldSets("CompanyName")
' .DataAxis.InsertFieldSet.FieldSets("ContactName")
' .DataAxis.InsertFieldSet.FieldSets("Phone")
' .FieldSets("Country").FilterMember = "USA"
'End With
pivotTable1.DisplayDesignTimeUI = True
pivotTable1.DisplayExpandIndicator = True
pivotTable1.DisplayFieldList = True
pivotTable1.AllowDetails = True
pivotTable1.ActiveView.AllowEdits = True
pivotTable1.ActiveView.AllowAdditions = True
pivotTable1.ActiveView.AllowDeletions = True
pivotTable1.DisplayToolbar = True

Response.Write(pivotTable1.HTMLData)

Regards,
 
A

Alvin Bruney [ASP.NET MVP]

What is this pointing to? "SQL Server Connection String"
Is it pointing to SQL server or a cube? The pivot table writes MDX
expressions, SQL server does not understand MDX expressions.
--
Regards,
Alvin Bruney

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc
 
R

raj

its not pointing to cube directly connecting to the SQL Server, I have
mentioned as "SQL Server Connection String" since I am posting in the forum.
This code works absolutly fine but here if you look at the code its using
Response.Write(pivotTable1.HTMLData) so the pivot report is going to be
static but where as I want to display interactive report. Can you help me out
how I can alter this code to generate the interactice report for the pivot
tables.

Regards,
 
A

Alvin Bruney [ASP.NET MVP]

You will need to use client side events to do your updates. On the submit
click event, you will need to write MDX queries targetted at the cube. If
you don't know MDX, you can learn by buying a book on amazon.

--
Regards,
Alvin Bruney

Auther Plug
OWC Blackbook now on download at www.lulu.com/owc
 
J

james

Raj, if i get it right, what you want to have is a fully controllable pivottable that re=
ads it's information from a mssql server table, am i right?

Well that's the same thing i need to do! I=C2=B4m amazed how dificult it is to find FULL=
-EASY-STEP-BY-STEP tutorials for newbies like me...

Anyways, After a thousand attempts, I've finally managed to set up a pivot table that=
pulls its data from mssql.. BUT, it's done on client script, so it only takes a left cli=
ck /view source to get access to my connstring, sql query, etc.. =


Could anybody PLEASE teach us how to accomplish that scenario? (pivottable + mssqls=
erver + code behind).

Kind regards,
James.

url:http://www.ureader.com/msg/11061284.aspx
 

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