<?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>Between the Elephant's Toes &#187; RADE Tips and Tricks</title>
	<atom:link href="http://landoris.com/blogs/lance/index.php/category/rade-tips-and-tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://landoris.com/blogs/lance</link>
	<description>Lance's Blog</description>
	<lastBuildDate>Tue, 14 Apr 2009 19:05:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Adding Custom Buttons to RADE</title>
		<link>http://landoris.com/blogs/lance/index.php/2009/03/adding-custom-buttons-to-rade/</link>
		<comments>http://landoris.com/blogs/lance/index.php/2009/03/adding-custom-buttons-to-rade/#comments</comments>
		<pubDate>Mon, 02 Mar 2009 23:11:37 +0000</pubDate>
		<dc:creator>Lance Maidlow</dc:creator>
				<category><![CDATA[RADE Tips and Tricks]]></category>
		<category><![CDATA[RADE]]></category>

		<guid isPermaLink="false">http://landorgis.com/blogs/lance/index.php/2009/03/adding-custom-buttons-to-rade/</guid>
		<description><![CDATA[I received a client request for a couple of new buttons for RADE. 

1. To add a button that would just run a query without bring up the query dialog
2. The other was to allow the user to zoom to a lat/lon coordinate


No problem, I contacted Landor and asked that these two buttons be created [...]]]></description>
			<content:encoded><![CDATA[<p>I received a client request for a couple of new buttons for RADE. </p>
<ul>
<li>1. To add a button that would just run a query without bring up the query dialog</li>
<li>2. The other was to allow the user to zoom to a lat/lon coordinate</li>
<li></li>
</ul>
<p>No problem, I contacted Landor and asked that these two buttons be created for RADE 3.5.</p>
<p>Big problem – I was told that we had agreed that there would not be any more development in RADE 3.5 as that would only delay the release of RADE 4. Some more words were exchanged about impacts, schedules and about sales reps which I won’t elaborate on.</p>
<p>I was also reminded that RADE offered users the ability to develop their own buttons. So I asked for a template on how to develop a custom button to run a user defined query or chart.</p>
<h3>Custom Button to Run a RADE Query</h3>
<p>The code template was pretty simple – I guess I should not have been whining after all. The basic format is:</p>
<div>
<div style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none">
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   1:</span> <span style="color: #0000ff">var</span> gszTgtQueryBuilder = fnCreateUniqueTarget(<span style="color: #006080">&quot;QueryBuilder&quot;</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   2:</span> <span style="color: #0000ff">function</span> pQuery2003()</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   3:</span> {</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   4:</span>     <span style="color: #0000ff">var</span> szQueryUrl=<span style="color: #006080">&quot;querybuilder/queryselect.aspx?A=2003&quot;</span>;</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: white; border-bottom-style: none"><span style="color: #606060">   5:</span>     goQueryBuilder = window.open(szQueryUrl, gszTgtQueryBuilder, <span style="color: #006080">'menubar=yes, resizable=yes, scrollbars=yes status=no, toolbar=no, width=300, height=300'</span>);</pre>
<pre style="padding-right: 0px; padding-left: 0px; font-size: 8pt; padding-bottom: 0px; margin: 0em; overflow: visible; width: 100%; color: black; border-top-style: none; line-height: 12pt; padding-top: 0px; font-family: consolas, &#39;Courier New&#39;, courier, monospace; border-right-style: none; border-left-style: none; background-color: #f4f4f4; border-bottom-style: none"><span style="color: #606060">   6:</span> }</pre>
</p></div>
</div>
<p>&#160;</p>
<p>Bottom line on the above is this:</p>
<ul>
<li>a) Function pQuery2003() &#8211; is the new function we are creating that runs the RADE query with a query_id of 2003.</li>
<li>b) var szQueryUrl=&quot;querybuilder/queryselect.aspx?A=2003&quot;; &#8211; the A=2003 is a specific parser to indicate that query_id 2003 is to be run</li>
<li></li>
</ul>
<p>RADE does not expose the query_id to users so I had to take a quick look at the WR_QUERY_NAME table in Toad to find the query_id for the query that I wanted to run.</p>
<p>So, given the above, I accessed the buttons dialog from the RADE administrator and filled in the dialog as shown in the image below:</p>
<p><a href="http://landorgis.com/blogs/lance/wp-content/uploads/2009/03/custombutton.png"><img title="RADE Custom Query Button Code" style="border-right: 0px; border-top: 0px; display: block; float: none; margin-left: auto; border-left: 0px; margin-right: auto; border-bottom: 0px" height="325" alt="RADE Custom Query Button Code" src="http://landorgis.com/blogs/lance/wp-content/uploads/2009/03/custombutton-thumb.png" width="644" border="0" /></a> </p>
<p>The above button will run the Places Query from a map based application. The toughest part of the whole exercise was selecting the images I wanted to use with this query.</p>
<p>&#160;</p>
<h3>Configuring a Custom Dashboard</h3>
<p>It occurs to me now that I can layout a complete application that simply places the queries that I want in a series of rows on a dashboard – interesting concept.</p>
<p>You can incorporate charts in the same way using the chart id and replacing “Query” in all the above with “Chart”.</p>
<div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:f279e157-f33c-4e59-a3f2-b3401ee7e675" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">Technorati Tags: <a href="http://technorati.com/tags/RADE" rel="tag">RADE</a></div>
]]></content:encoded>
			<wfw:commentRss>http://landoris.com/blogs/lance/index.php/2009/03/adding-custom-buttons-to-rade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
