Is there a way to change SQL Reporting "chart type" and "sub type" at runtime?
I'm working with a .rdlc report and can't seem to figure out the way to change this at runtime. I don't have the "Expression" ability in either of these fields.
Is there a way to change SQL Reporting "chart type" and "sub type" at runtime?
I'm working with a .rdlc report and can't seem to figure out the way to change this at runtime. I don't have the "Expression" ability in either of these fields.
I am trying to do this exact same thing. I have a set of measures that are shown and then a chart underneath that will show only one measure at a time, depending on user input (which of the measures they wish to see in chart form). However, certain measures are better as columns instead of lines, so I'd like to change the chart type at render-time.
My initial idea is to overlap two charts and set their visibility opposite of each other and according to the user dropdown input. Seems like there could be an easier way (if that idea would even work in the first place?)
Thanks.
I'm using 2008 and it is not solved there as far as I can see. There are so many options for chart type and then even more on subtype, I wouldn't want to have to render them all and then show or hide the right one.
I'm wondering if there is a way to parse the XML of the .rdlc and feed it back to the report viewer without having every user getting there own new modified version of the actual .rdlc file.
On a side note, MS just released a new charting package (from the acquisition of Dundas). Maybe I'll dump the report idea and go with the mschart server control.
One possible solution could be to generate both the charts you wanted and then hide one of them based on your requirement.
Your .rdlc file is where everything is defined about your report, including report type. So in cases where I want to change something about the report, I just modify the rdlc file using my favorite xml editing method (XmlDocument, XPath, etc.). You would just modify your RDLC file on the fly to change the report type, then display, or save, whatever.
I did this to allow users to set their own report colors, for example, since those are defined in the rdlc as well.