Hi!
I am not very familiar with programming web solutions for MS OLAP
Databases.
Currently I try to use the Pivot Table Service of MS Office Web
Components 10 (XP) in server-side scripting.
MS provides a small demo how to compile a pivot table in the server's
memory and then send it to the usa in pure HTML.
They use the Northwind Demo Database. Yet I tried to translate this
Demo to connect to a multidimensional OLAP cube ("Sales" from
"FoodMart 2000").
Below I pasted the error I get as well as the ASP script.
Can anyone out there help me to access the OLAP cube?
Greatest Thanks,
Felix
--------------------------------------------------------------------------- Syntaxfehler /iisHelp/common/500-100.asp, line 122 on error go to 0 Datenbank 'FoodMart 2000' ist nicht vorhanden. /Server Side X.asp, line 33 " ... which means: "Database 'FoodMart 2000' not available/existing" The ASP code is: -------------------------------------------------------------------------- Dim oPivot ' oPivot.CubeProvider = "msolap.2" ' Dim oView Dim oDim1Fields Dim oDim2Fields ' oView.DataAxis.InsertTotal oView.AddTotal("Unit Sales", ' oView.ExpandDetails = oPivot.Constants.plExpandNever ' Response.Write oPivot.HTMLData %>
"Kompilierungsfehler in Microsoft VBScript- Fehler '800a03ea'
---------^
Microsoft? OLE DB Provider fr Analysis Services- Fehler '80004005'
-------------------------------------------------------------------------
<%
'
'Create an in-memory reference to the PivotTable component.
'
Set oPivot = Server.CreateObject("OWC10.PivotTable")
'Connect to the OLAP FoodMart 2000 database.
'
oPivot.ConnectionString = "provider=MSOLAP.2;Data
Source=localhost;Initial Catalog=FoodMart 2000;Integrated
Security=SSPI;Persist Security Info=True;Client Cache Size=25;Auto
Synch Period=10000;"
oPivot.DataMember="Sales"
'Add fields to the row axis and column axis for grouping.
'
Set oView = oPivot.ActiveView
Set oDim1Fields = oView.FieldSets("Time")
oDim1Fields.Fields(0).Caption = "Time"
oView.RowAxis.InsertFieldSet oDim1Fields
Set oDim2Fields = oView.FieldSets("Gender")
oView.ColumnAxis.InsertFieldSet oDim2Fields
oTimeFields.Fields(0).Caption = "Gender"
'Add a total for the ProductSales fieldset.
'
oView.FieldSets("Unit Sales").Fields(0),
oPivot.Constants.plFunctionSum)
oView.Totals("Unit Sales").NumberFormat = "$#,##0"
'Collapse rows and columns.
'
'Send Data as HTML.
'
--------------------------------------------------------------------------