<?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>Wysmedia.com</title>
	<atom:link href="http://www.wysmedia.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wysmedia.com</link>
	<description>~ We make IT easy for you ~</description>
	<lastBuildDate>Fri, 08 May 2009 07:02:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Mirroring a Website with Httrack</title>
		<link>http://www.wysmedia.com/2009/05/mirroring-a-website-with-httrack/</link>
		<comments>http://www.wysmedia.com/2009/05/mirroring-a-website-with-httrack/#comments</comments>
		<pubDate>Fri, 08 May 2009 06:28:59 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Others]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[download]]></category>
		<category><![CDATA[httrack]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.wysmedia.com/?p=84</guid>
		<description><![CDATA[How to download / mirror website using Httrack. in this page, I explain how to download Wordpress codex. I love to have a offline version of Wordpress Codex so I can read when I am offline or away and there are no internet connection.]]></description>
			<content:encoded><![CDATA[<p>I have been use this for quite long long times. Before I was using <a href="http://www.gnu.org/software/wget/">GNU Wget (let&#8217;s call it wget)</a> to download a website (mirroring) because in the past I have limited internet connection (very expensive, because it use time based and slow). Wget is good for those who loves using linux and console (it available in windows as well). <span id="more-84"></span></p>
<p><img src="http://farm4.static.flickr.com/3397/3511642805_225e1a463f.jpg" alt="image of httrack window" /></p>
<p><a href="http://www.httrack.com/">Httrack</a> is windows based free software that using capabilities like those in wget. It can mirror a website, download all related pages. I used this software especially for downloading documentation sites. </p>
<p>Here is my Rules to download a <a href="http://codex.wordpress.org/Developer_Documentation">codex.wordpress.com</a> (just for Developer Documentation and its related pages) : </p>
<blockquote><p>+*.png +*.gif +*.jpg +*.css +*.js -ad.doubleclick.net/* -mime:application/foobar<br />
-http://codex.wordpress.org/Mailing_Lists<br />
-http://codex.wordpress.org/IRC<br />
-http://wordpress.org/support<br />
-http://codex.wordpress.org/Contributing_to_WordPress<br />
-http://codex.wordpress.org/Automated_Testing<br />
-*action=*<br />
-http://codex.wordpress.org/Codex:Community_Portal<br />
-*Help:*<br />
-http://codex.wordpress.org/Current_events<br />
-http://codex.wordpress.org/Special:Recentchanges<br />
-http://codex.wordpress.org/Special:Randompage<br />
-http://codex.wordpress.org/Development_Team</p></blockquote>
<p>In there I just need the Function References but for some reason I don&#8217;t want to download &#8220;unused&#8221; pages ..which I won&#8217;t read like (http://codex.wordpress.org/Current_events,http://codex.wordpress.org/Special:Recentchanges, etc). You can see there that I can put regular expression wildcard into the rules. I also put the limit to 3 depths parsing only so that I dont need to download large amount of pages.</p>
<p><img src="http://farm4.static.flickr.com/3569/3511649179_b883bf2bbb.jpg" alt="Rules for Downloading codex.wordpress.com" /></p>
<p>The nice part, is you can update the download without downloading all one by one in the future. Just don&#8217;t delete the files generated by Httrack. </p>
<p>Here is my complete commands that generate by Httrack.</p>
<blockquote><p>winhttrack -qwr3%e0C2%Ps0u1%s%uN0%I0p3DaK0H0%kf2A25000%f#f -F &#8220;Mozilla/4.5 (compatible; HTTrack 3.0x; Windows 98)&#8221; -%F &#8220;<!-- Mirrored from %s%s by HTTrack Website Copier/3.x [XR&#038;CO'2008], %s -->&#8221; -%l &#8220;en, en, *&#8221; http://codex.wordpress.org/Developer_Documentation -O1 &#8220;C:\Downloads\codex-wordpress\codex wordpress&#8221; +*.png +*.gif +*.jpg +*.css +*.js -ad.doubleclick.net/* -mime:application/foobar -http://codex.wordpress.org/Mailing_Lists -http://codex.wordpress.org/IRC -http://wordpress.org/support -http://codex.wordpress.org/Contributing_to_WordPress -http://codex.wordpress.org/Automated_Testing -*action=* -http://codex.wordpress.org/Codex:Community_Portal -*Help:* -http://codex.wordpress.org/Current_events -http://codex.wordpress.org/Special:Recentchanges -http://codex.wordpress.org/Special:Randompage -http://codex.wordpress.org/Development_Team </p></blockquote>
<p>ps: you can use httrack in console so you can create an scheduler to download / update / mirroring websites frequently.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/05/mirroring-a-website-with-httrack/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using Alternative Text in Image</title>
		<link>http://www.wysmedia.com/2009/05/using-alternative-text-in-image/</link>
		<comments>http://www.wysmedia.com/2009/05/using-alternative-text-in-image/#comments</comments>
		<pubDate>Wed, 06 May 2009 03:06:48 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[My Thought]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[alt]]></category>
		<category><![CDATA[image]]></category>

		<guid isPermaLink="false">http://www.wysmedia.com/?p=79</guid>
		<description><![CDATA[I used to browse a web image off in order to save the bandwith usage (also to speed up the loading). It is unpleasant sometimes to see a images that link to something but don&#8217;t have &#8220;alt&#8221; attributs that&#8217;s why sometimes I need to turn on the image for seeing what is the next. 

People [...]]]></description>
			<content:encoded><![CDATA[<p>I used to browse a web image off in order to save the bandwith usage (also to speed up the loading). It is unpleasant sometimes to see a images that link to something but don&#8217;t have &#8220;alt&#8221; attributs that&#8217;s why sometimes I need to turn on the image for seeing what is the next. </p>
<p><span id="more-79"></span><br />
People may not know the importance of using &#8220;alt&#8221; attribute in web design. It is very important, because it is good for Search Engine Optimization (SEO). Suppose someone search about something, the picture could help to increase the rating as well.</p>
<p>I just read this <a href="http://webaim.org/techniques/alttext/">web </a> it explain very well about using &#8220;alt&#8221;. It also encourage people to use alt although it is empty. Alt also shouldn&#8217;t redundant with the content of page. For example, when you want to display picture of Barack Obama, you don&#8217;t need to do like this :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;p&gt;
Picture of Barack Obama, the President of United States from 2009
&lt;img src='www.barackobama.com/obama.jpg' alt=&quot;picture of barack obama, president of united states&quot;/&gt;
&lt;/p&gt;</pre></td></tr></table></div>

<p>On the browser or web spider it will looks like :</p>
<blockquote><p>Picture of Barack Obama, the President of United States  picture of barack obama, president of united states</p></blockquote>
<p>It is redundant information. So you can simply put empty on the alt because the previous text has already explain it.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">&lt;p&gt;
Picture of Barack Obama, the President of United States from 2009
&lt;img src='www.barackobama.com/obama.jpg' alt=&quot;&quot;/&gt;
&lt;/p&gt;</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/05/using-alternative-text-in-image/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Native SQL Query on Grails</title>
		<link>http://www.wysmedia.com/2009/05/native-sql-query-on-grails/</link>
		<comments>http://www.wysmedia.com/2009/05/native-sql-query-on-grails/#comments</comments>
		<pubDate>Mon, 04 May 2009 14:50:44 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.wysmedia.com/?p=76</guid>
		<description><![CDATA[As we know, Hibernate Query Language or using GORM are not enough, for example if we want to create complex queries or using native sql functions ie. date() function in MySQL. That&#8217;s why we need to use Groovy SQL to achive that.
 
Before we started, I want to let you know that once we using [...]]]></description>
			<content:encoded><![CDATA[<p>As we know, Hibernate Query Language or using GORM are not enough, for example if we want to create complex queries or using native sql functions ie. date() function in MySQL. That&#8217;s why we need to use Groovy SQL to achive that.</p>
<p> <span id="more-76"></span></p>
<p>Before we started, I want to let you know that once we using native functions in sql, we might got problem when we tried to deploy on another database server. So be wise.</p>
<p>Here is simple example how to do that :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">groovy.sql.Sql</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ReportController <span style="color: #66cc66;">&#123;</span> 
    <span style="color: #000000; font-weight: bold;">def</span> dataSource <span style="color: #66cc66;">;</span> 
    .....
    <span style="color: #000000; font-weight: bold;">def</span> <span style="color: #993399;">print</span> <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
        .....
        <span style="color: #000000; font-weight: bold;">def</span> sql <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #993399; font-weight: bold;">Sql</span><span style="color: #66cc66;">&#40;</span>dataSource<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #aaaadd; font-weight: bold;">List</span> lparams <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#91;</span>startDate, endDate<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">;</span>
        <span style="color: #000000; font-weight: bold;">def</span> query2 <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;select * from invoiceh where trx_date between ? and ? &quot;</span><span style="color: #66cc66;">;</span>
        <span style="color: #000000; font-weight: bold;">def</span> result <span style="color: #66cc66;">=</span> sql.<span style="color: #006600;">rows</span><span style="color: #66cc66;">&#40;</span>query2,lparams<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        ......  <span style="color: #808080; font-style: italic;">// fetch the result into your gsp / you can process it further</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>This code will return result as array / collections.<br />
Simple isn&#8217;t it ?
</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=57a2f476-2a53-8865-b811-e18917781825" /></div>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/05/native-sql-query-on-grails/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dance with Dynamic Jasper Report</title>
		<link>http://www.wysmedia.com/2009/05/dance-with-dynamic-jasper-report/</link>
		<comments>http://www.wysmedia.com/2009/05/dance-with-dynamic-jasper-report/#comments</comments>
		<pubDate>Sat, 02 May 2009 03:07:35 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[dynamic jasper]]></category>
		<category><![CDATA[groovy]]></category>
		<category><![CDATA[jasper]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.wysmedia.com/?p=64</guid>
		<description><![CDATA[Tutorial on using custom queries with Dynamic Jasper Report in Grails web application]]></description>
			<content:encoded><![CDATA[<div id="attachment_70" class="wp-caption alignleft" style="width: 160px"><img src="http://www.wysmedia.com/wp-content/uploads/2009/05/jasper-report-opensource-150x40.jpg" alt="jasper report " title="jasper-report-opensource" width="150"  class="size-thumbnail wp-image-70" /><p class="wp-caption-text">jasper report </p></div>Dynamic Jasper Report is such a nice thing that exists in this world. You can create a report using powerfull Jasper Engine without creating a jrxml first. You don&#8217;t need iReport anymore. Actually I hate using iReport, it is not fun for me <img src='http://www.wysmedia.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  <span id="more-64"></span></p>
<p>I will show you step by step how to use Dynamic Jasper Report with custom query. I won&#8217;t show how to use <strong>static reportable</strong> in Domain because there are lots of tutorial like <a href="http://blog.lucastex.com/2009/04/16/4of25-jasper-reports-in-grails-with-dynamic-jasper/">this one</a></p>
<p><strong>Installing Plugins</strong><br />
It is as simple typing </p>
<blockquote><p> grails install-plugin dynamic-jasper</p></blockquote>
<p><strong>Generating Domains step</strong><br />
We create 2 domains name: Book and Author simply type</p>
<blockquote><p>
grails create-domain-class Book<br />
grails create-domain-class Author
</p></blockquote>
<p>and add some field on the domains :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> <span style="color: #aaaadd; font-weight: bold;">Book</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #aaaadd; font-weight: bold;">String</span> name <span style="color: #66cc66;">;</span> 
    <span style="color: #aaaadd; font-weight: bold;">String</span> barcode <span style="color: #66cc66;">;</span>
    <span style="color: #aaaadd; font-weight: bold;">String</span> summary<span style="color: #66cc66;">;</span>
    Author author<span style="color: #66cc66;">;</span> 
&nbsp;
    <span style="color: #000000; font-weight: bold;">static</span> belongsTo <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#91;</span>author:Author<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">static</span> constraints <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
        name<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">false</span>, blank:<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        barcode<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">false</span>, blank:<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        summary<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">false</span>, blank:<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #aaaadd; font-weight: bold;">String</span> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #ff0000;">&quot;${name}&quot;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Author <span style="color: #66cc66;">&#123;</span>
    <span style="color: #aaaadd; font-weight: bold;">String</span> name <span style="color: #66cc66;">;</span>
    <span style="color: #aaaadd; font-weight: bold;">String</span> summary <span style="color: #66cc66;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">static</span> hasMany <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#91;</span>books:<span style="color: #aaaadd; font-weight: bold;">Book</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">static</span> constraints <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span>
        name<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">false</span>, blank:<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        summary<span style="color: #66cc66;">&#40;</span>nullable:<span style="color: #000000; font-weight: bold;">false</span>, blank:<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #aaaadd; font-weight: bold;">String</span> toString<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        <span style="color: #ff0000;">&quot;${name}&quot;</span><span style="color: #66cc66;">;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p><b> Create a controller for displaying the Jasper </b></p>
<blockquote><p>grails create-controller Report</p></blockquote>
<p>Here we want to create an excel report so we fill ReportController with this :</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
</pre></td><td class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">net.sf.jasperreports.engine.*</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">net.sf.jasperreports.engine.data.*</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">net.sf.jasperreports.engine.export.*</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">net.sf.jasperreports.engine.util.*</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">net.sf.jasperreports.view.*</span><span style="color: #66cc66;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">ar.com.fdvs.dj.domain.DynamicReport</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">ar.com.fdvs.dj.domain.builders.FastReportBuilder</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">ar.com.fdvs.dj.core.DynamicJasperHelper</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">ar.com.fdvs.dj.core.layout.ClassicLayoutManager</span><span style="color: #66cc66;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #a1a100;">ar.com.fdvs.dj.output.*</span><span style="color: #66cc66;">;</span>
&nbsp;
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> ReportController <span style="color: #66cc66;">&#123;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">def</span> index <span style="color: #66cc66;">=</span> <span style="color: #66cc66;">&#123;</span> 
        FastReportBuilder drb <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> FastReportBuilder<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        drb <span style="color: #66cc66;">=</span> drb.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Book Name&quot;</span>,<span style="color: #ff0000;">&quot;name&quot;</span>,<span style="color: #aaaadd; font-weight: bold;">String</span>.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        drb <span style="color: #66cc66;">=</span> drb.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Barcode&quot;</span>,<span style="color: #ff0000;">&quot;barcode&quot;</span>,<span style="color: #aaaadd; font-weight: bold;">String</span>.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        drb <span style="color: #66cc66;">=</span> drb.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Author&quot;</span>,<span style="color: #ff0000;">&quot;author.name&quot;</span>,<span style="color: #aaaadd; font-weight: bold;">String</span>.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        drb <span style="color: #66cc66;">=</span> drb.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Author Summary&quot;</span>,<span style="color: #ff0000;">&quot;author.summary&quot;</span>,<span style="color: #aaaadd; font-weight: bold;">String</span>.<span style="color: #000000; font-weight: bold;">class</span>.<span style="color: #006600;">getName</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #cc66cc;">70</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        DynamicReport dr <span style="color: #66cc66;">=</span> drb.<span style="color: #006600;">setTitle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;My tester &quot;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setUseFullPageWidth</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">build</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
        JRDataSource ds <span style="color: #66cc66;">=</span> <span style="color: #000000; font-weight: bold;">new</span> JRBeanCollectionDataSource<span style="color: #66cc66;">&#40;</span><span style="color: #aaaadd; font-weight: bold;">Book</span>.<span style="color: #006600;">list</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>   
        JasperPrint jp <span style="color: #66cc66;">=</span> DynamicJasperHelper.<span style="color: #006600;">generateJasperPrint</span><span style="color: #66cc66;">&#40;</span>dr, 
                <span style="color: #000000; font-weight: bold;">new</span> ClassicLayoutManager<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, ds<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
&nbsp;
&nbsp;
        <span style="color: #000000; font-weight: bold;">def</span> reportFormat <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">'XLS'</span><span style="color: #66cc66;">;</span>
        <span style="color: #000000; font-weight: bold;">def</span> reportFileName <span style="color: #66cc66;">=</span> <span style="color: #ff0000;">&quot;myReport&quot;</span><span style="color: #66cc66;">;</span>
        ReportWriter reportWriter <span style="color: #66cc66;">=</span> ReportWriterFactory.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getReportWriter</span><span style="color: #66cc66;">&#40;</span>jp, reportFormat, <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>JRHtmlExporterParameter.<span style="color: #006600;">IMAGES_URI</span><span style="color: #66cc66;">&#41;</span>: <span style="color: #ff0000;">&quot;${request.contextPath}/report/image?image=&quot;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>reportFileName<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            response.<span style="color: #006600;">addHeader</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'content-disposition'</span>, <span style="color: #ff0000;">&quot;attachment; filename=${reportFileName}.${reportFormat.toLowerCase()}&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#125;</span>
        reportWriter.<span style="color: #006600;">writeTo</span><span style="color: #66cc66;">&#40;</span>response<span style="color: #66cc66;">&#41;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>FastReportBuilder will create columns and do what the jrxml does.<br />
DynamicReport will build the report for you (i think it identical with compiling jrxml to .jasper)</p>
<p>You fill data of the report using JRBeanCollectionDataSource. here we use simple query Book.list(). You might try it using Criteria as well.</p>
<p>To display the report in the browser, we just tell the browser about the header and its content by this code :</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;">ReportWriter reportWriter <span style="color: #66cc66;">=</span> ReportWriterFactory.<span style="color: #006600;">getInstance</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getReportWriter</span><span style="color: #66cc66;">&#40;</span>jp, reportFormat, <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#40;</span>JRHtmlExporterParameter.<span style="color: #006600;">IMAGES_URI</span><span style="color: #66cc66;">&#41;</span>: <span style="color: #ff0000;">&quot;${request.contextPath}/report/image?image=&quot;</span>.<span style="color: #006600;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>reportFileName<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
            response.<span style="color: #006600;">addHeader</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'content-disposition'</span>, <span style="color: #ff0000;">&quot;attachment; filename=${reportFileName}.${reportFormat.toLowerCase()}&quot;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#125;</span>
        reportWriter.<span style="color: #006600;">writeTo</span><span style="color: #66cc66;">&#40;</span>response<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&lt;</span>/blockquote<span style="color: #66cc66;">&gt;</span></pre></div></div>

<p>done &#8230; that&#8217;s so easy.</p>
<p><div id="attachment_68" class="wp-caption alignleft" style="width: 784px"><img src="http://www.wysmedia.com/wp-content/uploads/2009/05/dynamic-jasper-result.png" alt="dynamic jasper result in excel format" title="dynamic-jasper-result" width="550" class="size-full wp-image-68" /><p class="wp-caption-text">dynamic jasper result in excel format</p></div>
<p>more information about dynamice jasper visit:<br />
<a href="http://dynamicjasper.sourceforge.net/">http://dynamicjasper.sourceforge.net/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/05/dance-with-dynamic-jasper-report/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>vim search and replace on multiple files</title>
		<link>http://www.wysmedia.com/2009/03/vim-search-and-replace-on-multiple-files/</link>
		<comments>http://www.wysmedia.com/2009/03/vim-search-and-replace-on-multiple-files/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 15:20:03 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.wysmedia.comyr.com/?p=58</guid>
		<description><![CDATA[ To search and replace on multiple files 
First type :args **/*.groovy (change groovy with file extension you want to search and replace)


Type :argdo %s/something to replace/with new words/g &#124;w

 When you type &#124;w, it means you tell vim to save every edited file. If you are not using w, it will not save and [...]]]></description>
			<content:encoded><![CDATA[<p> To search and replace on multiple files </p>
<blockquote><p>First type <strong>:args **/*.groovy</strong> (change groovy with file extension you want to search and replace)
</p></blockquote>
<blockquote><p>
Type <strong>:argdo %s/something to replace/with new words/g |w</strong>
</p></blockquote>
<p> When you type |w, it means you tell vim to save every edited file. If you are not using w, it will not save and stopped on first file (it always ask file save before going on to next file)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/03/vim-search-and-replace-on-multiple-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zebra Style on Table with JQuery</title>
		<link>http://www.wysmedia.com/2009/03/zebra-table-with-jquery/</link>
		<comments>http://www.wysmedia.com/2009/03/zebra-table-with-jquery/#comments</comments>
		<pubDate>Fri, 20 Mar 2009 05:58:21 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.wysmedia.comyr.com/?p=56</guid>
		<description><![CDATA[This is very cool tips that I found from jquery documentation. Create a table zebra with just one line of code. 
You define a css for evenrow and oddrow with different colors.

$('#yourTableID tr:even').attr('class','evenrow');
$('#yourTableID tr:odd').attr('class','oddrow');

]]></description>
			<content:encoded><![CDATA[<p>This is very cool tips that I found from jquery documentation. Create a table zebra with just one line of code. </p>
<p>You define a css for evenrow and oddrow with different colors.</p>
<pre lang="javascript" number="1">
$('#yourTableID tr:even').attr('class','evenrow');
$('#yourTableID tr:odd').attr('class','oddrow');
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/03/zebra-table-with-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Open Flash Chart .6 for Grails</title>
		<link>http://www.wysmedia.com/2009/03/open-flash-chart-6-for-grails/</link>
		<comments>http://www.wysmedia.com/2009/03/open-flash-chart-6-for-grails/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 03:35:16 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[grails]]></category>

		<guid isPermaLink="false">http://www.wysmedia.comyr.com/?p=53</guid>
		<description><![CDATA[It is released new version for open flash chart for Grails.
the tutorial was on http://mybytes.wordpress.com/
The difference is that 0.6 using OFC version 2 and 0.5 still using version 1. Version 2 is not compatible with version 1 so please watch out when you tried to update that plugin.
More information about Open Flash Chart 2, check [...]]]></description>
			<content:encoded><![CDATA[<p>It is released new version for open flash chart for Grails.<br />
the tutorial was on <a href="http://mybytes.wordpress.com/">http://mybytes.wordpress.com/</a></p>
<p>The difference is that 0.6 using OFC version 2 and 0.5 still using version 1. Version 2 is not compatible with version 1 so please watch out when you tried to update that plugin.</p>
<p>More information about Open Flash Chart 2, check the maker web on <a href="http://teethgrinder.co.uk/open-flash-chart-2/">http://teethgrinder.co.uk/open-flash-chart-2/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/03/open-flash-chart-6-for-grails/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>which one you prefer ?</title>
		<link>http://www.wysmedia.com/2009/03/which-one-you-prefer/</link>
		<comments>http://www.wysmedia.com/2009/03/which-one-you-prefer/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 04:49:33 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[My Thought]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[web]]></category>
		<category><![CDATA[xml]]></category>

		<guid isPermaLink="false">http://www.wysmedia.comyr.com/?p=49</guid>
		<description><![CDATA[ I just having thought of current JavaFx that using syntax that looks like Groovy DSL. I think it is fun to have a syntax like that, instead of using XML. I hate XML you know &#8230;. 

Which one you like ?

&#60;html&#62;
    &#60;body&#62;
        &#60;table&#62;
  [...]]]></description>
			<content:encoded><![CDATA[<p> I just having thought of current JavaFx that using syntax that looks like Groovy DSL. I think it is fun to have a syntax like that, instead of using XML. I hate XML you know &#8230;. </p>
<p>
Which one you like ?</p>

<div class="wp_syntax"><div class="code"><pre class="html" style="font-family:monospace;">&lt;html&gt;
    &lt;body&gt;
        &lt;table&gt;
            &lt;tr&gt;
                &lt;td&gt; something here &lt;/td&gt;
                &lt;td&gt; something here too &lt;/td&gt;
                &lt;td&gt; something here as well&lt;/td&gt;
            &lt;/tr&gt;
             &lt;tr&gt;
                &lt;td&gt; another line here &lt;/td&gt;
                &lt;td&gt; another line here too &lt;/td&gt;
                &lt;td&gt; another line here as well&lt;/td&gt;
            &lt;/tr&gt;
        &lt;/table&gt;
        &lt;a href=&quot;http://wysmedia.comyr.com&quot;&gt; wysmedia&lt;/a&gt;
    &lt;/body&gt;
&lt;/html&gt;</pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">html<span style="color: #009900;">&#123;</span>
    body<span style="color: #009900;">&#123;</span>
        table<span style="color: #009900;">&#123;</span>
            tr<span style="color: #009900;">&#123;</span>
                td<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;something here&quot;</span><span style="color: #009900;">&#125;</span>
                td<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;something here too&quot;</span><span style="color: #009900;">&#125;</span>
                td<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;something here as well&quot;</span><span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
            tr<span style="color: #009900;">&#123;</span>
                td<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;another line &quot;</span><span style="color: #009900;">&#125;</span>
                td<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;another line too&quot;</span><span style="color: #009900;">&#125;</span>
                td<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;another line as well&quot;</span><span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        p<span style="color: #009900;">&#123;</span>
            h2<span style="color: #009900;">&#123;</span><span style="color: #0000ff;">&quot;a paragraph&quot;</span><span style="color: #009900;">&#125;</span>
            a<span style="color: #009900;">&#123;</span>
                href<span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;http://wysmedia.comyr.com&quot;</span>
                title<span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;link to wysmedia&quot;</span>
                <span style="color: #0000ff;">&quot;wysmedia.com&quot;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

</p>
<p> which one you like the most ? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/03/which-one-you-prefer/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Groovy 1.6 new features</title>
		<link>http://www.wysmedia.com/2009/03/groovy-16-new-features/</link>
		<comments>http://www.wysmedia.com/2009/03/groovy-16-new-features/#comments</comments>
		<pubDate>Fri, 06 Mar 2009 20:50:21 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.wysmedia.comyr.com/?p=47</guid>
		<description><![CDATA[InfoQ written about new features that implemented in Groovy 1.6.
Cannot wait to see it on Grails 1.1 as well .. 
read the full story here 
]]></description>
			<content:encoded><![CDATA[<p>InfoQ written about new features that implemented in Groovy 1.6.<br />
Cannot wait to see it on Grails 1.1 as well .. </p>
<p>read the full story <a href="http://www.infoq.com/articles/groovy-1-6">here </a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/03/groovy-16-new-features/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yipee</title>
		<link>http://www.wysmedia.com/2009/03/yipee/</link>
		<comments>http://www.wysmedia.com/2009/03/yipee/#comments</comments>
		<pubDate>Tue, 03 Mar 2009 01:14:19 +0000</pubDate>
		<dc:creator>adwin</dc:creator>
				<category><![CDATA[Others]]></category>

		<guid isPermaLink="false">http://www.wysmedia.comyr.com/2009/03/yipee/</guid>
		<description><![CDATA[I am alive   hahahaha
still doing with groovy and grails
]]></description>
			<content:encoded><![CDATA[<p>I am alive <img src='http://www.wysmedia.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  hahahaha<br />
still doing with groovy and grails</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wysmedia.com/2009/03/yipee/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Analytics Code -->
