When using a chart control to plot data from a stored procedure (or any query for that matter), the stored procedure needs to return series’ in columns. Data to be plotted has to be in numeric form. How, then, can we label the series? Perhaps one would think to add a row at the top of the result set to contain the labels. But that won’t work because the column data types are numeric and the labels are most likely strings.
Tagged :: visual studio
Aug 09
If you’re having trouble plotting series of data using the Chart Control, make sure that the data coming in is plottable.
That means using a numerical data type. Duh!
Jun 09
Many of Microsoft’s development products, when given an SQL query, will try to perform all sorts of analysis and breakdowns on the query — usually in an attempt to visualize what’s going on. When the queries become too complex (as the tend to be), they just can’t be parsed and visualized. Furthermore, when the successful parsing of a query is critical to one of their “wizards”, your report creation process can be brought to a standstill.
Queries that have a few levels of subquery nesting, or that have UNIONs, for example, will sometimes break parsing.
So, if you don’t want your development tools (such as Visual Studio) to get in the way of completing a report wizard, put your SQL query in a stored procedure. This way, your tools won’t be concerned with the nitty gritty details of your query. You can still pass @variables to the query, and you can make changes to the query without stepping into your designer’s .rdlc files.


