Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
Multiple chart with same sqldatasource
posted

Hello,

I basically have 10 chart that shows the sales result of top 10 companies. The sql query is the same for each one them except for the companyid which is the parameter.
Unfortunately it always shows the same data for the 10 charts and this is the data for the last chart.
I manually change the paramter "companyid" and then force the chart to databind but I am still getting the same data on each chart.

Any idea of how I could do that without creating 10 sqldatasource?

Thanks

  • 17605
    posted

    Hi,

    Yes, if you are using one datasource object, at the end of creating the page you'll have same data for each chart. This is happening because we are initializing the data depending on the datasource in the Render event of the page and at this moment that data is the same. In your case you probably need to created different datasource objects for each chart.