A place to log my programming solutions.

Tagged :: visual studio

11
Aug 09

Chart Control Dynamic Data Labels

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.

Read more »

11
Aug 09

Plotting a Line Graph using Chart control

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!

14
Jun 09

When Wizards Get in the Way

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.

wizard.jpg 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.

About NVNCBL and Myself

Contact Me