locked
basic bar chart question RRS feed

  • Question

  • User632751675 posted

    hi,

    I created a couple of queries for some bar charts.  There are a few parameters for each of the queries.   One of the queries groups by  a date range and the other by another value that appear in the x-axis.  I was asked to create one query based on the user's input and use one bar chart for this.  I know how to change the grouping based on the parameters, but I don't know how to change the bar chart on the fly to pick up the different values.  Is this possible?  I've been looking for examples, but I haven't found any yet. 

    My reports and graphs are on a report server and I have a reportviewer in my application that points to them.

    Friday, March 4, 2016 4:32 PM

All replies

  • User-219423983 posted

    Hi maggiemays,

    One of the queries groups by  a date range and the other by another value that appear in the x-axis. 

    I don't know how to change the bar chart on the fly to pick up the different values.  Is this possible?  I've been looking for examples, but I haven't found any yet. 

    My reports and graphs are on a report server and I have a reportviewer in my application that points to them.

    According to your description I guess you want to get X-axis value when you click the Chart in the Report Viewer and then then pass the value to a query string to load data. If I’m wrong, please let me know. If so, as I searched, it’s difficult go the mouse click position in Report Viewer. I think you could change your mind and then try first loading the Report to a MS chart and then refer to the following links to learn how to get the X-axis value from MSChart and then pass the value to your query string.

    http://stackoverflow.com/questions/9647666/finding-the-value-of-the-points-in-a-chart

    http://stackoverflow.com/questions/5425122/showing-mouse-axis-coordinates-on-chart-control

    Best Regards,

    Weibo Zhang

    Monday, March 7, 2016 2:57 PM