Connecting OCW Pivot with ChartSpace

I

Ivan

I created an ASP page displaying statistical information using the OCW11
Pivot object. Well the next step after customizing the look I would like to
display the information in a Chart.

I'm able to provide the ChartSpace with the same ConnectionString and
CommandText but that makes a second execution of the same sql statement. And
having the new resultset I still have the need to customize the look in the
ChartSpace.

Isn't there a more efficient way?
To reduce a second SQL execution can't I set the PivotTable resultset to the
ChartSpace object.
Or even better, display a graph from the final PivotTable look?

Please give me some advice or at least an URL where I could find this
information, I have been trying to find some useful OCW information but it's
very limited what's out there.

Thank in advance,

Ivan
 
I

Ivan

If only there would be better OWC documentation...

The solution was quiet easy.
After creating the Pivot Table and ChartSpace I tried to set the
connectionstring and commandtext from the one to the other object. While
that works perfectly it does duplicate the pulling of the data. Therefore
here's the correct version:

'Already created a Pivot Table instance named PivotTable1 and
'a ChartSpace object named ChartSpace1

ChartSpace1.DataSource = PivotTable1

This simple assignment will automatically create the chart with the data
from the pivot table At the same time it is also updated. However, there's
more, The link is both ways, so when the user updates the chart, the changes
will also be reflected in the Pivot Table.

While this was a quick and easy solution I'm a little disappointed in the
more expert users from this discussion board. This must have been done this
before.
So fellow developers, mentoring works both ways. Once in while you need
help, once in while you give help!

Ivan
 

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