Issue with binding data to the Pivot Table control in OWC

S

silellak

I am running into a very frustrating problem with the Pivot Table
control. It seems to affect at least OWC 9, 10, and 11.

Right now I am trying to set the data source of the Pivot Table to the
result of a stored procedure as below:

DataSourceControl1.DisplayAlerts = True
DataSourceControl1.ConnectionString = SQLConn.ConnectionString
DataSourceControl1.Connection.CommandTimeout = 120
DataSourceControl1.DisplayAlerts = True
Set rsd = DataSourceControl1.RecordsetDefs.AddNew(querystring,3)
PivotTable.DataSource = DataSourceCOntrol1
PivotTable.DataMember = rsd

Where "querystring" is something like "exec CrossTab_DeliverySchedule".

However, when viewing the PivotTable.XMLData after
"PivotTable.DataMember = rsd", it is missing most of the columns. The
names of these columns are generated dynamically in the Stored
Procedure using a query to a view, which is the only thing special
about them. The other columns, which come directly from the table,
seem to come through correctly.

Strangely, if I had a MsgBox directly after the "PivotTable.DataMember
= rsd" line, then the column data is retrieved correctly.

Does anyone know why this strange behavior might be happening?

On a related question, I've noticed that the XMLData property of the
PivotTable seems to make changes to a string assigned to it. I can
check the value of a string, assign it to XMLData (even if XMLData is
blank!), and the value will be different than the string I assigned to
it. Any idea what causes this?

Thanks for any help you can provide!
 

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