<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Solution Log &#124; Antonio David - NVNCBL &#187; visual studio</title>
	<atom:link href="http://www.nvncbl.com/tagged/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nvncbl.com</link>
	<description>A place to log my programming solutions for future reference</description>
	<lastBuildDate>Mon, 17 May 2010 21:39:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Chart Control Dynamic Data Labels</title>
		<link>http://www.nvncbl.com/2009/08/chart-control-dynamic-data-labels/</link>
		<comments>http://www.nvncbl.com/2009/08/chart-control-dynamic-data-labels/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 21:32:35 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[label]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=302</guid>
		<description><![CDATA[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&#8217; 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 [...]]]></description>
			<content:encoded><![CDATA[<p>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&#8217; 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&#8217;t work because the column data types are numeric and the labels are most likely strings.</p>
<p><span id="more-302"></span><strong>Fix:</strong></p>
<p>Have the stored procedure return the data labels in separate columns.  For example, you have a table:</p>
<table border="0">
<tbody>
<tr>
<th>year</th>
<th>best</th>
<th>average</th>
<th>worst</th>
</tr>
<tr>
<td>2009</td>
<td>5</td>
<td>4</td>
<td>3</td>
</tr>
<tr>
<td>2008</td>
<td>7</td>
<td>5</td>
<td>3</td>
</tr>
<tr>
<td>2007</td>
<td>6</td>
<td>5</td>
<td>4</td>
</tr>
<tr>
<td>2006</td>
<td>15</td>
<td>3</td>
<td>2</td>
</tr>
<tr>
<td>2005</td>
<td>6</td>
<td>1</td>
<td>0</td>
</tr>
</tbody>
</table>
<p>&#8230; and in the resulting graph, you want series &#8220;best&#8221; and &#8220;worst&#8221; to be labeled something different. Simply modify the result to look like:</p>
<table border="0">
<tbody>
<tr>
<th>year</th>
<th>best</th>
<th>average</th>
<th>worst</th>
<th>best_label</th>
<th>worst_label</th>
</tr>
<tr>
<td>2009</td>
<td>5</td>
<td>4</td>
<td>3</td>
<td>Region 1</td>
<td>Region 4</td>
</tr>
<tr>
<td>2008</td>
<td>7</td>
<td>5</td>
<td>3</td>
<td>Region 1</td>
<td>Region 4</td>
</tr>
<tr>
<td>2007</td>
<td>6</td>
<td>5</td>
<td>4</td>
<td>Region 1</td>
<td>Region 4</td>
</tr>
<tr>
<td>2006</td>
<td>15</td>
<td>3</td>
<td>2</td>
<td>Region 1</td>
<td>Region 4</td>
</tr>
<tr>
<td>2005</td>
<td>6</td>
<td>1</td>
<td>0</td>
<td>Region 1</td>
<td>Region 4</td>
</tr>
</tbody>
</table>
<p>&#8230; and from there, set the label to the value of the new label columns.  It admittedly isn&#8217;t the most conceptually elegant solution to the problem, but if you&#8217;re pressed for time and desperately in need of a quick fix, why not go for it?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/08/chart-control-dynamic-data-labels/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plotting a Line Graph using Chart control</title>
		<link>http://www.nvncbl.com/2009/08/plotting-a-line-graph-using-chart-control/</link>
		<comments>http://www.nvncbl.com/2009/08/plotting-a-line-graph-using-chart-control/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 18:23:54 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[chart control]]></category>
		<category><![CDATA[graph]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[plot]]></category>
		<category><![CDATA[series]]></category>
		<category><![CDATA[visual studio]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=300</guid>
		<description><![CDATA[If you&#8217;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!
]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re having trouble plotting series of data using the Chart Control, make sure that the data coming in is plottable.</p>
<p>That means using a <strong>numerical </strong>data type.  Duh!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/08/plotting-a-line-graph-using-chart-control/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When Wizards Get in the Way</title>
		<link>http://www.nvncbl.com/2009/06/when-wizards-get-in-the-way/</link>
		<comments>http://www.nvncbl.com/2009/06/when-wizards-get-in-the-way/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 17:57:07 +0000</pubDate>
		<dc:creator>Antonio</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[reporting]]></category>
		<category><![CDATA[sql]]></category>
		<category><![CDATA[stored procedure]]></category>
		<category><![CDATA[visual studio]]></category>
		<category><![CDATA[wizard]]></category>

		<guid isPermaLink="false">http://www.nvncbl.com/?p=238</guid>
		<description><![CDATA[Many of Microsoft&#8217;s development products, when given an SQL query, will try to perform all sorts of analysis and breakdowns on the query &#8212; usually in an attempt to visualize what&#8217;s going on.  When the queries become too complex (as the tend to be), they just can&#8217;t be parsed and visualized.  Furthermore, when the successful [...]]]></description>
			<content:encoded><![CDATA[<p>Many of Microsoft&#8217;s development products, when given an SQL query, will try to perform all sorts of analysis and breakdowns on the query &#8212; usually in an attempt to visualize what&#8217;s going on.  When the queries become too complex (as the tend to be), they just can&#8217;t be parsed and visualized.  Furthermore, when the successful parsing of a query is critical to one of their &#8220;wizards&#8221;, your report creation process can be brought to a standstill.</p>
<p>
<a href="http://www.nvncbl.com/wp-content/gallery/articles/wizard.jpg" title="" class="shutterset_singlepic23" >
	<img class="ngg-singlepic ngg-left" src="http://www.nvncbl.com/wp-content/gallery/cache/23__125x94_wizard.jpg" alt="wizard.jpg" title="wizard.jpg" />
</a>
Queries that have a few levels of subquery nesting, or that have UNIONs, for example, will sometimes break parsing.</p>
<p>So, if you don&#8217;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&#8217;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&#8217;s .rdlc files.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.nvncbl.com/2009/06/when-wizards-get-in-the-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
