Hi,
Here is a code snippet for adding a PivotTable MS Office control in a (ASP)webpage:
-------------------------------------------
Function Window_OnLoad()
Set c = PTable.Constants
'Connect to the data source.
PTable.ConnectionString = _
"provider=msolap;data source=YourServer;inital catalog=Foodmart 2000;"
PTable.DataMember = "Sales"
Set oView = PTable.ActiveView
'Add Dimensions to the column, row, and filter axes.
oView.ColumnAxis.InsertFieldSet oView.FieldSets("Time")
oView.ColumnAxis.DisplayEmptyMembers = True
oView.RowAxis.InsertFieldSet oView.FieldSets("Store")
oView.RowAxis.DisplayEmptyMembers = True
oView.FilterAxis.InsertFieldSet oView.FieldSets("Product")
'Add a total to the data area.
oView.DataAxis.InsertTotal oView.Totals("Store Sales")
oView.Totals("Store Sales").NumberFormat = "_($* #,##0_)"
aStates = Array("Cleared", "Checked", "Gray")
End Function
-------------------------------------------
I want to hide the ConnectionString value from my webpage. Is there any way to do that? Or else the user of the application can click 'View Source' in the browser and read the credentials. I know PivotTable MS Office control is a client-side Active-X component and it is also intialized on client-side. But is there a solution? A workaround?. Any help will be greatly appreciated.
Thanks.
Haq
Here is a code snippet for adding a PivotTable MS Office control in a (ASP)webpage:
-------------------------------------------
Function Window_OnLoad()
Set c = PTable.Constants
'Connect to the data source.
PTable.ConnectionString = _
"provider=msolap;data source=YourServer;inital catalog=Foodmart 2000;"
PTable.DataMember = "Sales"
Set oView = PTable.ActiveView
'Add Dimensions to the column, row, and filter axes.
oView.ColumnAxis.InsertFieldSet oView.FieldSets("Time")
oView.ColumnAxis.DisplayEmptyMembers = True
oView.RowAxis.InsertFieldSet oView.FieldSets("Store")
oView.RowAxis.DisplayEmptyMembers = True
oView.FilterAxis.InsertFieldSet oView.FieldSets("Product")
'Add a total to the data area.
oView.DataAxis.InsertTotal oView.Totals("Store Sales")
oView.Totals("Store Sales").NumberFormat = "_($* #,##0_)"
aStates = Array("Cleared", "Checked", "Gray")
End Function
-------------------------------------------
I want to hide the ConnectionString value from my webpage. Is there any way to do that? Or else the user of the application can click 'View Source' in the browser and read the credentials. I know PivotTable MS Office control is a client-side Active-X component and it is also intialized on client-side. But is there a solution? A workaround?. Any help will be greatly appreciated.
Thanks.
Haq