V
Velociraptor
I need to be able to use the OWC PivotTable control as a general Pivoting
engine (I am using SQL 2000 and Access projects don't have a crosstab query
capability). The format of the PivotTable component is completely unusable
for reports (and forms IMHO) so I need raw pivoted data to supply reports
that have been formatted in a reasonable way. I have finally managed to work
out how to do this programmatically:
1) Open an Access form that contains a PivotTable component
2) Programmatically setup the data source, the row headings, columns and
data fields
3) Issue PivotTable.ActiveView.COPY to copy the contents of the crosstab
view to the clipboard
4) Create an OWC SpreadSheet component
5) Paste the clipboard into the Spreadsheet
6) Write the Spreadsheet as CSV to a file
7) Read the CSV file and parse it into a table
All this because Microsoft don't give us a simple means of extracting the
data from the PivotTable. (Come on MS - an ADO.Recordset property for
PivotTable would do the trick!)
My problem is that step 3 TAKES FOREVER.Copying a view that has just 8
columns and less than 200 rows to the clipboard takes more than a minute on
a twin 1.7GHz Dell with 1.5GB RAM! This is less than 5K of raw data. I need
to extract data with more than 10,000 rows. The performance of the PivotData
control in generating the crosstab is exemplary, why is the extraction so
slow.
Dows anybody have any ideas as to how I can extract data quickly from a a
PivotTable component?
Paul
engine (I am using SQL 2000 and Access projects don't have a crosstab query
capability). The format of the PivotTable component is completely unusable
for reports (and forms IMHO) so I need raw pivoted data to supply reports
that have been formatted in a reasonable way. I have finally managed to work
out how to do this programmatically:
1) Open an Access form that contains a PivotTable component
2) Programmatically setup the data source, the row headings, columns and
data fields
3) Issue PivotTable.ActiveView.COPY to copy the contents of the crosstab
view to the clipboard
4) Create an OWC SpreadSheet component
5) Paste the clipboard into the Spreadsheet
6) Write the Spreadsheet as CSV to a file
7) Read the CSV file and parse it into a table
All this because Microsoft don't give us a simple means of extracting the
data from the PivotTable. (Come on MS - an ADO.Recordset property for
PivotTable would do the trick!)
My problem is that step 3 TAKES FOREVER.Copying a view that has just 8
columns and less than 200 rows to the clipboard takes more than a minute on
a twin 1.7GHz Dell with 1.5GB RAM! This is less than 5K of raw data. I need
to extract data with more than 10,000 rows. The performance of the PivotData
control in generating the crosstab is exemplary, why is the extraction so
slow.
Dows anybody have any ideas as to how I can extract data quickly from a a
PivotTable component?
Paul