<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Hans Kristanto</title>
	<atom:link href="http://kristantohans.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://kristantohans.wordpress.com</link>
	<description>programming, catholic, philosophy, photography</description>
	<lastBuildDate>Mon, 02 Jan 2012 10:44:07 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='kristantohans.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/52d060dbe05ee1fabcf32c5b8e9df58c?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Hans Kristanto</title>
		<link>http://kristantohans.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://kristantohans.wordpress.com/osd.xml" title="Hans Kristanto" />
	<atom:link rel='hub' href='http://kristantohans.wordpress.com/?pushpress=hub'/>
		<item>
		<title>LambdaJ as an alternative to query out from Collections (Stop Iterations!!)</title>
		<link>http://kristantohans.wordpress.com/2011/08/06/lambdaj-as-an-alternative-to-query-out-from-collections-stop-iterations/</link>
		<comments>http://kristantohans.wordpress.com/2011/08/06/lambdaj-as-an-alternative-to-query-out-from-collections-stop-iterations/#comments</comments>
		<pubDate>Sat, 06 Aug 2011 08:05:43 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Collections]]></category>
		<category><![CDATA[Database]]></category>
		<category><![CDATA[DSL]]></category>
		<category><![CDATA[Iterations]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java Tutorial]]></category>
		<category><![CDATA[Lambdaj]]></category>
		<category><![CDATA[List]]></category>
		<category><![CDATA[Query]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=438</guid>
		<description><![CDATA[I remember the first time i was taught Data Structure during my college time, there was a way to generate all data from a collection (ArrayList, LinkedList, etc). At that time, i was thinking that it was the best way to populate the data until a position where i learnt how to build a web [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=438&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I remember the first time i was taught Data Structure during my college time, there was a way to generate all data from a collection (ArrayList, LinkedList, etc). At that time, i was thinking that it was the best way to populate the data until a position where i learnt how to build a web application and optimization. It is not optimized at all to iterate all the data everytime we triggered an event (let say &#8216;key event&#8217; when we type &#8216;A&#8217; and all data consisting &#8216;A&#8217; will appear).<br />
Microsoft .NET have LINQ, but how about Java? Don&#8217;t worry for all of you, there are a lot also tools to do things like this. I will highlight my current post today for LambdaJ. LambdaJ is a library to manipulate a collections without any iterations. You can also implement a &#8216;SQL&#8217;like syntax into it. </p>
<p>To use LambdaJ, you have to download 3 dependencies library for this :</p>
<p>1. CGLib (download from <a href="http://sourceforge.net/projects/cglib/files/" target="_BLANK">here</a>)<br />
2. LambdaJ (download from <a href="http://code.google.com/p/lambdaj/" target="_BLANK">here</a>)<br />
3. Hamcrest Matcher (download from <a href="http://code.google.com/p/hamcrest/downloads/list" target="_BLANK">here</a>)<br />
NOTE:for Hamcrest Matcher lib, download the one with keyword <b>all</b></p>
<p>For example if you have a collections below :</p>
<p><pre class="brush: java;">

List&lt;String&gt; listOfNames = new ArrayList&lt;String&gt;();
listOfNames.add(&quot;Hans&quot;);
listOfNames.add(&quot;Pricillia&quot;);

</pre></p>
<p>If you want to merge all the data inside of the list, instead of using <b>for</b>, you can use a method from LambdaJ like below :</p>
<p><pre class="brush: java;">

package test.lambdaj;

import java.util.List;
import java.util.ArrayList;
import static ch.lambdaj.Lambda.*;

/**
 *
 * @author Hans Kristanto
 */
public class Main {
    
    public static void main(String[] args){
    
        List&lt;String&gt; list = new ArrayList&lt;String&gt;();
        list.add(&quot;Hans&quot;);
        list.add(&quot;Pricillia&quot;);
        
        String names = &quot;&quot;;
        names = join(list,&quot;-&quot;);
        
        System.out.println(names);
    }
}   

</pre></p>
<p>The result will be :</p>
<p><pre class="brush: java;">
Hans-Pricillia
</pre></p>
<p>Of course it is not all LambdaJ can do, here come the funkiest stuff <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> .</p>
<p>Let say we have this list below given :</p>
<p><pre class="brush: java;">

List&lt;String&gt; listOfNames = new ArrayList&lt;String&gt;();
listOfNames.add(&quot;Orange&quot;);
listOfNames.add(&quot;Mango&quot;);
listOfNames.add(&quot;Guava&quot;);
listOfNames.add(&quot;Banana&quot;);
listOfNames.add(&quot;Papaya&quot;);
listOfNames.add(&quot;Strawberry&quot;);

</pre></p>
<p>You want to populate all data containing letter of &#8216;o&#8217; into new List, you can do like this below :</p>
<p><pre class="brush: java;">

package test.lambdaj;

import java.util.List;
import java.util.ArrayList;
import static ch.lambdaj.Lambda.*;
import static org.hamcrest.Matchers.*; //IMPORTANT TO DO A MATCHER STUFF

/**
 *
 * @author Hans Kristanto
 */
public class Main {
    
    public static void main(String[] args){
    
        List&lt;String&gt; listOfNames = new ArrayList&lt;String&gt;();
        listOfNames.add(&quot;Orange&quot;);
        listOfNames.add(&quot;Mango&quot;);
        listOfNames.add(&quot;Guava&quot;);
        listOfNames.add(&quot;Banana&quot;);
        listOfNames.add(&quot;Papaya&quot;);
        listOfNames.add(&quot;Strawberry&quot;);
        
        List&lt;String&gt; listOfNewFruit;
        listOfNewFruit = select(listOfNames, having(on(String.class),containsString(&quot;o&quot;)));
        
        String names = join(listOfNewFruit,&quot;~&quot;);

        System.out.println(names);
    }
}   

</pre></p>
<p>And the result will be :</p>
<p><pre class="brush: java;">
Mango
</pre></p>
<p>Awesome is it? It will be much more useful for you if you have a case like you have bunches of data generated from DB for example, but you dont want to periodically retrieve from the DB since the data always the same. This can be much more helpful for you.</p>
<p>You can refer more examples from javaone slides below :<br />
<a href="http://code.google.com/p/lambdaj/downloads/detail?name=lambdaj-javaone-slides.pdf" target="_BLANK">LambdaJ Slides</a>.</p>
<p>PS: This tutorial i highly dedicate it to my beloved future fiance Pricillia Gunawan <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>ENJOY!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/438/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/438/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/438/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=438&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2011/08/06/lambdaj-as-an-alternative-to-query-out-from-collections-stop-iterations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>
	</item>
		<item>
		<title>Enabling GC logs in Apache Tomcat</title>
		<link>http://kristantohans.wordpress.com/2011/07/22/enabling-gc-logs-in-apache-tomcat/</link>
		<comments>http://kristantohans.wordpress.com/2011/07/22/enabling-gc-logs-in-apache-tomcat/#comments</comments>
		<pubDate>Fri, 22 Jul 2011 16:17:14 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache analyze]]></category>
		<category><![CDATA[apache tomcat]]></category>
		<category><![CDATA[application server]]></category>
		<category><![CDATA[gc logs]]></category>
		<category><![CDATA[performance monitoring]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=417</guid>
		<description><![CDATA[There are so many way to analyze the performance of Application Server. 1 of those are called GC logs. GC logs is a log to monitor the movement of your application server&#8217;s memory usage. GC log is superb to analyze any kind of memory leaks or even analyze your optimization of your application. GC is [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=417&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>There are so many way to analyze the performance of Application Server. 1 of those are called GC logs. GC logs is a log to monitor the movement of your application server&#8217;s memory usage. GC log is superb to analyze any kind of memory leaks or even analyze your optimization of your application. GC is actually stand for Garbage Collection, method in JVM to collecting all un-used or un-referenced object in memory to free up memory. So, lets get it on!</p>
<p><strong>1. Enabling CATALINA_OPTS option and setting up the GC log enable parameter</strong></p>
<p>You need to enable your CATALINA_OPTS parameter. CATALINA_OPTS is a parameter that allow you to specify a specific option during the startup of your tomcat server, such as the initial parameter for heap space, perm space, and so on. This can be done in 2 ways. In Windows Environment, you can create a new variable in your Environment Variable. Another simpler way, you can go to bin folder of your tomcat directory, find for <strong>startup.bat</strong> script. Open the script and you can set the CATALINA_OPTS variable. I prefer the second way to be explained since the first one only applicable for Windows user only.<br />
So, open your startup.bat script, and add this code below :</p>
<p><pre class="brush: bash;">set &quot;CATALINA_OPTS=-Xloggc:log.gc&quot;</pre></p>
<p>at wherever you want (as long as it is put before <strong>:end</strong> and it is not in between <strong>if</strong> listing code <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  ).<br />
The <strong>-Xloggc</strong> is parameter for enabling GC logs. and <strong>log.gc</strong> is the name of file that will contain the log for memory. if you write like this, the GC will be created in <strong>bin</strong> folder right after server getting started up.</p>
<p><strong>2. Start your apache tomcat</strong></p>
<p>Next step, run your startup.bat. Right after the server getting started up, you will see in your bin folder, there will be a file called log.gc as per screen shot below :</p>
<p><a href="http://kristantohans.files.wordpress.com/2011/07/log-gc.jpg"><img src="http://kristantohans.files.wordpress.com/2011/07/log-gc.jpg?w=645" alt="" title="log-gc"   class="aligncenter size-full wp-image-425" /></a></p>
<p>If you can see this file, it means you have succesfully enabling your gc log for your performance monitor.</p>
<p><strong>3. Analyze your GC logs</strong></p>
<p>You might want to analyze your GC log since you have enable it and i&#8217;m pretty sure that you dont want to open the file using the editor since the content is such a horrible.<br />
There are a lot of tools to analyze it, 1 sample that i take is HPjmeter, 1 of free application too analyze. You can google it to download 1 copy for you. Once you have installed it, you can drag your log.gc file into it, and you can see several options that you can use. Below is the sample screen shot from HPjmeter based on my log.gc :</p>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2011/07/log-gc1.jpg"><img src="http://kristantohans.files.wordpress.com/2011/07/log-gc1.jpg?w=300&#038;h=204" alt="GC Log Chart Example" title="GC Log Chart Example" width="300" height="204" class="aligncenter size-medium wp-image-426" /></a><p class="wp-caption-text">GC Log Chart Example</p></div>
<div id="attachment_427" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2011/07/log-gc2.jpg"><img src="http://kristantohans.files.wordpress.com/2011/07/log-gc2.jpg?w=300&#038;h=204" alt="" title="GC Time Duration" width="300" height="204" class="size-medium wp-image-427" /></a><p class="wp-caption-text">GC Time Duration</p></div>
<p>Enjoy!!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/417/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/417/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/417/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=417&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2011/07/22/enabling-gc-logs-in-apache-tomcat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2011/07/log-gc.jpg" medium="image">
			<media:title type="html">log-gc</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2011/07/log-gc1.jpg?w=300" medium="image">
			<media:title type="html">GC Log Chart Example</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2011/07/log-gc2.jpg?w=300" medium="image">
			<media:title type="html">GC Time Duration</media:title>
		</media:content>
	</item>
		<item>
		<title>Matrimony in Catholic Perspective</title>
		<link>http://kristantohans.wordpress.com/2011/05/16/matrimony-in-catholic-perspective/</link>
		<comments>http://kristantohans.wordpress.com/2011/05/16/matrimony-in-catholic-perspective/#comments</comments>
		<pubDate>Mon, 16 May 2011 13:20:07 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Katolik]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=408</guid>
		<description><![CDATA[I don&#8217;t know why i really get interested at the first time i thinking about this topic. Actually i haven&#8217;t get marry yet, but this topic is quite attractive for me, and i believe for any people with the same age with me. Well, i have done some researched about it and would like to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=408&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know why i really get interested at the first time i thinking about this topic. Actually i haven&#8217;t get marry yet, but this topic is quite attractive for me, and i believe for any people with the same age with me. Well, i have done some researched about it and would like to give a brief explanation about matrimony in Catholic Perspective.</p>
<p>Based on <a href='http://www.imankatolik.or.id/pemahaman-perkawinan-menurut-gereja-katolik.html' target='_BLANK'>this</a> link, what is defined with matrimony is :</p>
<p><i>&#8220;Living Fellowship &#8211; Among a single Man and a single Woman &#8211; That is happened because personal agreement that is unbreakable &#8211; and have to be targetted to loving each other, and a family creation &#8211; And must be faithfull with one another and can not be separated except by the death.&#8221;</i></p>
<p>From this definition, It is obvious that Matrimony is not only a matrimony. But deeper of that, it has a special meaning for a human, especially a catholic to be fulfilled.</p>
<p>It&#8217;s not an issue nowadays that we can see a lot of artists or even an ordinary people are so easy to get married and after several years or even months, they can also easily divorced due to a problem or whatsoever. This is the thing that should be prevented in catholic&#8217;s matrimony.</p>
<p>To marry means that 1 man and 1 woman have to love each other, with all their hearts, without forcing, and especially, they have to commit with their matrimony itself. The baseline of matrimony is love. And 1 thing we have to take note is, that the love should be everlasting, since it&#8217;s indeed that love is the based of Matrimony. Once again, love is the based ground of Matrimony. 1 man and 1 woman have to maintain their love even they are getting older, and not physically attractive. And also Matrimony is sacred, which means that for 1 single life, matrimony can only be conducted once, and can not be separated except by death (refering back to the definition above). So it is true that 1 single man and 1 single woman have to love, again, have to love each other until the death come. From the definition above also we can see that another purpose of matrimony is, to build a family. This is written also in Genesis chapter 1 verse 28 :</p>
<p><i>&#8220;God blessed them and said to them, “Be fruitful and increase in number; fill the earth and subdue it. Rule over the fish in the sea and the birds in the sky and over every living creature that moves on the ground.&#8221;</i></p>
<p>God said this words during the creation of Human. So, matrimony is to build a family and a family is built on top of matrimony. So, by right it&#8217;s impossible to build a family without matrimony (this is 1 thing that the world has distorted the meaning of matrimony). If you build a family, you will have children. You have to educate them with all right things, so that they can grow in the right way also as well. Your children are gift as you already built a family, so you have to really really care with the children since its a grace from God.</p>
<p>From my brief explanation, we can there is a sequence for having a matrimony. To marry someone is not easy, because it has a value to marry someone, and it has a commitment. You might have to sacrifice a lot of things for your wedding. But to marry means you open a new life, a new life with someone that you really love and you are ready to be faithful with. And also, it have to happen only once in a lifetime. So, you have to be careful with your choice, you have to know him/her very well, and you really have to make sure that your choice is the one that God sent to you.</p>
<p>Well, this is my short opinion regarding matrimony. Any ideas and suggestion are highly welcome <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/408/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/408/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/408/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=408&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2011/05/16/matrimony-in-catholic-perspective/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>
	</item>
		<item>
		<title>Tomcat 7.0 for Beginners</title>
		<link>http://kristantohans.wordpress.com/2010/10/01/tomcat-7-0-for-beginners/</link>
		<comments>http://kristantohans.wordpress.com/2010/10/01/tomcat-7-0-for-beginners/#comments</comments>
		<pubDate>Fri, 01 Oct 2010 04:37:48 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[apache tomcat]]></category>
		<category><![CDATA[deploy]]></category>
		<category><![CDATA[server tomcat]]></category>
		<category><![CDATA[tomcat]]></category>
		<category><![CDATA[tomcat deployment]]></category>
		<category><![CDATA[tomcat getting started]]></category>
		<category><![CDATA[tomcat tutorial]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=354</guid>
		<description><![CDATA[Tomcat, or officially named Apache Tomcat is a light-weight web container used for deploying and running web application based on Java. Just like apache for PHP as container, tomcat&#8217;s role is becoming a runtime for java web application. There are so many web container in the world but i choose tomcat as this tutorial since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=354&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption aligncenter" style="width: 278px"><img alt="tomcat" src="http://www.anshinfotech.com/images/technoLogo/apache-tomcat_logo_nomatte.jpg" title="Apache Tomcat Icon" width="268" height="129" /><p class="wp-caption-text">tomcat</p></div><br />
Tomcat, or officially named Apache Tomcat is a light-weight web container used for deploying and running web application based on Java. Just like apache for PHP as container, tomcat&#8217;s role is becoming a runtime for java web application. There are so many web container in the world but i choose tomcat as this tutorial since tomcat is quite easy to be understood and the server management is not that difficult. So for beginner, tomcat is a good kickstart to a real application server. For development, tomcat is a best friend since it has a very quick startup and it&#8217;s reliable for small number of applications.</p>
<p><b>INSTALLING TOMCAT 7.0</b></p>
<p><b>1. Download your Tomcat 7.0</b></p>
<p>Download the latest tomcat 7.0 in <a href='http://tomcat.apache.org/download-70.cgi' target='blank'>here</a>.<br />
<i>Note : </i>I prefer to use the distribution version one, so i recommend to choose any files <b>except</b> the installer version for windows since it is easy to be modified and to be moved to other computer.</p>
<p><b>2. Extract the downloaded file</b></p>
<p>Extract the file, then you will see a structure like this :<br />
<div id="attachment_361" class="wp-caption aligncenter" style="width: 160px"><a href="http://kristantohans.files.wordpress.com/2010/10/fold.png"><img src="http://kristantohans.files.wordpress.com/2010/10/fold.png?w=300&#038;h=224" alt="" title="fold" width="300" height="224" class="size-thumbnail wp-image-361" /></a><p class="wp-caption-text">Folder Structure</p></div></p>
<p>After you finished this steps, you have succesfully installed your tomcat to your computer. Now let&#8217;s heading on the configuration.</p>
<p><b>CONFIGURING TOMCAT</b></p>
<p><b>1. Define administrator password</b></p>
<p>In tomcat, administrator term is defined as manager. In default, there will be no user in tomcat 7.0 as a manager. You have to add yours. To add new user, go to <b>${TOMCAT_INSTALLATION_DIR}/conf/</b> and open <b>tomcat-users.xml</b>. </p>
<p><a href="http://kristantohans.files.wordpress.com/2010/10/code.png"><img src="http://kristantohans.files.wordpress.com/2010/10/code.png?w=450&#038;h=96" alt="" title="code" width="450" height="96" class="aligncenter size-medium wp-image-369" /></a></p>
<p>At the first time you will see line 29 to 35 will be commented. Please uncomment these lines by removing <!-- and --> tag. After that, add additional line for creating your user, and the code will be seen something like this : </p>
<p><pre class="brush: plain;">
&lt;role rolename=&quot;tomcat&quot;/&gt;
&lt;role rolename=&quot;role1&quot;/&gt;
&lt;user username=&quot;tomcat&quot; password=&quot;tomcat&quot; roles=&quot;tomcat&quot;/&gt;
&lt;user username=&quot;both&quot; password=&quot;tomcat&quot; roles=&quot;tomcat,role1&quot;/&gt;
&lt;user username=&quot;role1&quot; password=&quot;tomcat&quot; roles=&quot;role1&quot;/&gt;
&lt;user username=&quot;haka&quot; password=&quot;haka&quot; roles=&quot;manager-gui&quot;/&gt;
</pre></p>
<p><i>Note</i> : Pay attention for the most bottom line. The username i set to &#8220;haka&#8221; and password set to &#8220;haka&#8221;. You can freely change these 2. But if you want the user to be manager, add <b>manager-gui</b> as the roles.</p>
<p><b>2. Configure local port</b></p>
<p>To configure any ports in Tomcat, go to <b>${TOMCAT_INSTALLATION_DIR}/conf/</b> and open file <b>server.xml</b>. After that, you can see whole configuration for server will be listed up there. For now, we will just customize port for host only. Go to line 67 in the file then you will see listing code like this :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/10/code-2.png"><img src="http://kristantohans.files.wordpress.com/2010/10/code-2.png?w=450&#038;h=51" alt="" title="code-2" width="450" height="51" class="aligncenter size-medium wp-image-376" /></a></p>
<p>You can change the port into any available port you like.<br />
<i>Note </i>: If you have Oracle database installed, it might make a conflict since oracle listener use port 8080. So remember, if you have an oracle database installed, highly recommended that you change the port into other port, for example 8005, 8088, 8001, 8800,or whatever port you like <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . And also, you can change the connection timeout variable. This variable define how long will the system wait for starting the server. in this case, the value is 20000, means that the system will wait for 20 seconds IF the server is not tend to start.</p>
<p>I have oracle database installed in my current computer and i prefer port 8088, so that i change to port to 8088 :</p>
<p><pre class="brush: xml;">
&lt;Connector port=&quot;8088&quot; protocol=&quot;HTTP/1.1&quot;
               connectionTimeout=&quot;20000&quot; 
               redirectPort=&quot;8443&quot; /&gt;
</pre></p>
<p>For a while, you have done with the minimum configuration for tomcat.</p>
<p><b>3. Starting the service</b></p>
<p>For starting the service, go to <b>${TOMCAT_INSTALLATION_DIR}/bin/</b> then execute file <b>startup.bat</b>. If everything is working fine, you will see a pop up uneditable command prompt windows like this : </p>
<p><a href="http://kristantohans.files.wordpress.com/2010/10/tomcat-window.png"><img src="http://kristantohans.files.wordpress.com/2010/10/tomcat-window.png?w=450&#038;h=227" alt="" title="tomcat-window" width="450" height="227" class="aligncenter size-medium wp-image-383" /></a></p>
<p>Congratulations!! You have succesfully started your tomcat server <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><b>4. Accessing root directory in server</b></p>
<p>Go to your browser and type this :</p>
<p><b>http://localhost:8088/</b></p>
<p>The 8088 port is really depend on what port you set in the server.xml. If you use 8080, then you have to type localhost:8080, and so on. If it&#8217;s successful, then you will see display like this :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/10/home.png"><img src="http://kristantohans.files.wordpress.com/2010/10/home.png?w=450&#038;h=297" alt="" title="home" width="450" height="297" class="aligncenter size-medium wp-image-396" /></a></p>
<p><b>5. Administering your server</b></p>
<p>You have set your username and password for the manager. If you want to administer your server, go to <b>http://localhost:8088/manager/html</b>. Then a pop dialog will be prompted, requesting user name and password.</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/10/prompt.png"><img src="http://kristantohans.files.wordpress.com/2010/10/prompt.png?w=645" alt="" title="prompt"   class="aligncenter size-full wp-image-399" /></a></p>
<p>Enter your username and password (for my case, user is haka and password is haka). If it&#8217;s succesfull, the screen will drive you to the manager screen : </p>
<div id="attachment_402" class="wp-caption aligncenter" style="width: 520px"><a href="http://kristantohans.files.wordpress.com/2010/10/manager.png"><img src="http://kristantohans.files.wordpress.com/2010/10/manager.png?w=645" alt="" title="manager"   class="size-full wp-image-402" /></a><p class="wp-caption-text">Tomcat Administration</p></div>
<p>You can customize your server, customize the application deployed and you can even deploy your web application via this screen.</p>
<p>That&#8217;s tutorial for beginners of Tomcat. Next time i will prepare the tutorial of how deploying your first java web application. Stay tune <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . God bless!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=354&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/10/01/tomcat-7-0-for-beginners/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://www.anshinfotech.com/images/technoLogo/apache-tomcat_logo_nomatte.jpg" medium="image">
			<media:title type="html">Apache Tomcat Icon</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/fold.png?w=150" medium="image">
			<media:title type="html">fold</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/code.png?w=300" medium="image">
			<media:title type="html">code</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/code-2.png?w=300" medium="image">
			<media:title type="html">code-2</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/tomcat-window.png?w=530" medium="image">
			<media:title type="html">tomcat-window</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/home.png?w=300" medium="image">
			<media:title type="html">home</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/prompt.png" medium="image">
			<media:title type="html">prompt</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/10/manager.png" medium="image">
			<media:title type="html">manager</media:title>
		</media:content>
	</item>
		<item>
		<title>Review : iReport 3.7 book</title>
		<link>http://kristantohans.wordpress.com/2010/04/04/review-ireport-3-7-book/</link>
		<comments>http://kristantohans.wordpress.com/2010/04/04/review-ireport-3-7-book/#comments</comments>
		<pubDate>Sun, 04 Apr 2010 14:49:15 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=331</guid>
		<description><![CDATA[This month, i received an email from Packt Publishing, and i&#8217;m offered to review their latest release book. It was a great opportunity for me since packtpub is a huge book publisher. Packtpub has just released their latest book about JasperReport. The name is iReport 3.7, written by Shamsuddin Ahammad. I read this book and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=331&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This month, i received an email from <a href='http://www.packtpub.com/' target='blank'>Packt Publishing</a>, and i&#8217;m offered to review their latest release book. It was a great opportunity for me since packtpub is a huge book publisher. Packtpub has just released their latest book about JasperReport. The name is <a href='http://www.packtpub.com/ireport-3-7/book' target='blank'><b>iReport 3.7</b></a>, written by <i>Shamsuddin Ahammad</i>.</p>
<div id="attachment_335" class="wp-caption aligncenter" style="width: 253px"><a href="http://www.packtpub.com/ireport-3-7/book" target="blank"><img src="http://kristantohans.files.wordpress.com/2010/03/1847198805.jpg?w=243&#038;h=300" alt="PacktPub : iReport 3.7" title="PacktPub : iReport 3.7" width="243" height="300" class="size-medium wp-image-335" /></a><p class="wp-caption-text">PacktPub : iReport 3.7</p></div>
<p>I read this book and i can only say that, this book is what you are looking for to start learning about JasperReport until you mastering it. The book show you how to learn about JasperReport from scratch and step by step. You will not got lost in the middle of the book. You can find the style of reading in this book is very unique. Once again, i&#8217;m sure you will get interested in reading this book.</p>
<p>The book comprises of 12 chapters, and the order of all chapters is sorted by how you should understand iReport first until you got advanced. Every piece of definition, code snippet, and display highlight is explained very clear. You will not only understand but will totally understand about what is being explained. And of course, because this book is offered for ones who want to start learning JasperReport, all you need to have is only a passion to learn.</p>
<p><b>Chapter 1 : Introduction to iReport</b></p>
<p>This chapter provided all about beginning iReport, downloading and installing iReport, and so on. This chapter provide a very basic introduction of how using basic iReport.</p>
<p><b>Chapter 2 : Building Your First Report</b><br />
In this chapter, the book provided about how to build your first report, creating datasource and exporting the report.</p>
<p><b>Chapter 3 : Report Layout and Formatting</b><br />
This section explained about setting up your report pages and how to make your report professional look. This section also explained about positioning elements to your report.</p>
<p><b>Chapter 4 : Using Variables</b><br />
This section is mainly discussed about variables, how to use and implement it into your report.</p>
<p><b>Chapter 5 : Using Parameters</b><br />
In this chapter, the writer explains very clear about parameter, what is parameter in iReport and how to implement it in your report.</p>
<p><b>Chapter 6 : Grouping Data in Reports</b><br />
You can group your data in iReport and this section provides how to do it in step by step.</p>
<p><b>Chapter 7 : Subreports</b><br />
Subreport is an important element in a report and this section explains about creating your subreport and bind it to an existing report.</p>
<p><b>Chapter 8: Crosstab Report</b><br />
In this chapter you will gain an understanding of what crosstab reports are and how to use crosstab reports.</p>
<p><b>Chapter 9: Charting</b><br />
In this chapter you will learn how to create report with pie charts, 3d pie charts, and bar charts. Since charting is an important of report, you need to pay attention for this chapter.</p>
<p><b>Chapter 10: Working with Images</b><br />
This chapter covers showing images in reports from the database, static images from the hard drive, and setting a background image in a report.</p>
<p><b>Chapter 11: Calling iReport from Java Applications</b><br />
In this chapter you will learn about the JasperReports library for calling iReport from your Java application.</p>
<p><b>Chapter 12: iReport in NetBeans</b><br />
This section covers about installing iReport plugins in NetBeans and creating reports from inside NetBeans IDE.</p>
<p><b>Chapter 13: A Sample Database</b><br />
This chapter presents the design and development of an inventory.</p>
<p><b>Approach</b></p>
<p>Step-by-step example-based tutorials make is very easy to be learnt and be followed.</p>
<p><b>Who this book is written for</b></p>
<p>This book is a very good book and good for all JasperReports developer from beginner to advance.</p>
<p>I highly recommend this book for all beginners of iReport. For more information, please visit <a href='https://www.packtpub.com/ireport-3-7/book?utm_source=js_ireport3.7_abr2_0310&amp;utm_medium=content&amp;utm_campaign=janice'>this</a> link.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/331/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/331/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/331/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=331&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/04/04/review-ireport-3-7-book/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/1847198805.jpg?w=243" medium="image">
			<media:title type="html">PacktPub : iReport 3.7</media:title>
		</media:content>
	</item>
		<item>
		<title>New to JasperReport : Parameterizing your Report</title>
		<link>http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-parameterizing-your-report/</link>
		<comments>http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-parameterizing-your-report/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 01:19:22 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[basic report with java]]></category>
		<category><![CDATA[jasper]]></category>
		<category><![CDATA[jasper report]]></category>
		<category><![CDATA[jasper report basic]]></category>
		<category><![CDATA[java pdf]]></category>
		<category><![CDATA[java report]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[report with java]]></category>
		<category><![CDATA[tutorial jasper report]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=320</guid>
		<description><![CDATA[In previous article, you&#8217;ve learnt how to build your first application using JasperReport. you see that the query fetch all record. We, somehow, never need all records but only several records. In SQL, we can use WHERE clause to add conditional for fetching records. We can do this too with JasperReport. 1. Open your iReport [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=320&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In previous article, you&#8217;ve learnt how to build your first application using JasperReport. you see that the query fetch all record. We, somehow, never need all records but only several records. In SQL, we can use WHERE clause to add conditional for fetching records. We can do this too with JasperReport. </p>
<p><b>1. Open your iReport designer</b><br />
If you follow the tutorial from scratch, open your recent report project about Employee Report. Now, add Parameter into your iReport by right-click to parameters node on the left :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/report-2.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/report-2.jpg?w=645" alt="" title="report-2"   class="aligncenter size-full wp-image-321" /></a></p>
<p>Give it name <b>PARAM_E_ID</b>.</p>
<p><b>2. Integrate your parameter variable with the query</b><br />
To integrate your parameter variable, type this query in your query window :</p>
<p><pre class="brush: sql;">
SELECT employee_id AS &quot;E_ID&quot;, employee_name AS &quot;E_NAME&quot;, salary AS &quot;E_SALARY&quot; FROM employees WHERE employee_id = $P{PARAM_E_ID}
</pre></p>
<p>Note : You can dynamically add value to your parameter variable.</p>
<p><b>3. Preview your report</b><br />
Click preview button, then you&#8217;ll be prompted to insert a value to PARAM_E_ID parameter :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/param.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/param.jpg?w=300&#038;h=136" alt="" title="param" width="300" height="136" class="aligncenter size-medium wp-image-323" /></a></p>
<p>After that, you will see the report will be different :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/repott.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/repott.jpg?w=300&#038;h=145" alt="" title="repott" width="300" height="145" class="aligncenter size-medium wp-image-324" /></a></p>
<p>Copy your .jasper file into your project. Replace it if it&#8217;s already exist.</p>
<p><b>4. Code your application</b><br />
To fill your parameter as conditional from your Java Application to your report, use <b>java.util.HashMap</b>. In this case, we have 1 parameter, PARAM_E_ID. Then in your hashmap, use this code :</p>
<p><pre class="brush: java;">
HashMap hm = new HashMap();
hm.put(&quot;PARAM_E_ID&quot;,&quot;E0001&quot;);
//and your other parameter
</pre></p>
<p>Let&#8217;s recall my previous article <a target='blank' href='http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-build-your-first-impressive-application-part-2/'>here</a> and look at the java code part. You will see in the line 52 the code is like this :</p>
<p><pre class="brush: java;">
JasperPrint jp = JasperFillManager.fillReport(is, null, conn);
</pre></p>
<p>To unite the hashmap with your report, replace this part into this :</p>
<p><pre class="brush: java;">
HashMap hm = new HashMap();
hm.put(&quot;PARAM_E_ID&quot;,&quot;E0001&quot;);
JasperPrint jp = JasperFillManager.fillReport(is, hm, conn);
</pre></p>
<p>After that, you will see the difference :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/report-13.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/report-13.jpg?w=300&#038;h=225" alt="" title="report-13" width="300" height="225" class="aligncenter size-medium wp-image-327" /></a></p>
<p>Enjoy!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/320/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/320/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/320/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=320&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-parameterizing-your-report/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/report-2.jpg" medium="image">
			<media:title type="html">report-2</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/param.jpg?w=300" medium="image">
			<media:title type="html">param</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/repott.jpg?w=300" medium="image">
			<media:title type="html">repott</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/report-13.jpg?w=300" medium="image">
			<media:title type="html">report-13</media:title>
		</media:content>
	</item>
		<item>
		<title>New to JasperReport : Build your first impressive application (part 2)</title>
		<link>http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-build-your-first-impressive-application-part-2/</link>
		<comments>http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-build-your-first-impressive-application-part-2/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 00:54:19 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[basic report with java]]></category>
		<category><![CDATA[jasper]]></category>
		<category><![CDATA[jasper report]]></category>
		<category><![CDATA[jasper report basic]]></category>
		<category><![CDATA[java pdf]]></category>
		<category><![CDATA[java report]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[report with java]]></category>
		<category><![CDATA[tutorial jasper report]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=274</guid>
		<description><![CDATA[So now, you&#8217;ve seen the 2 previous articles. And now, let&#8217;s move on the core of JasperReport and the integration of it to the desktop application. I guarantee you that you really need this article because you don&#8217;t want your application only capable to do just System.out.println(&#8220;Hello Everybody!&#8221;); do you? Let&#8217;s get it on! 1. [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=274&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So now, you&#8217;ve seen the 2 previous articles. And now, let&#8217;s move on the core of JasperReport and the integration of it to the desktop application. I guarantee you that you really need this article because you don&#8217;t want your application only capable to do just System.out.println(&#8220;Hello Everybody!&#8221;); do you?</p>
<p>Let&#8217;s get it on!</p>
<p><b>1. Building your report</b><br />
You can see in the right panel, there&#8217;s a palette panel. If you can&#8217;t see it, go to <b>Window -&gt; Palette</b> to activate palette panel. Drag a static text to the Title Section as follows :<br />
<div id="attachment_276" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/repot-1.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/repot-1.jpg?w=300&#038;h=231" alt="" title="repot-1" width="300" height="231" class="size-medium wp-image-276" /></a><p class="wp-caption-text">Make it look like this</p></div></p>
<p>After that, insert column title into similar like this :<br />
<a href="http://kristantohans.files.wordpress.com/2010/02/des2.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/des2.jpg?w=300&#038;h=205" alt="" title="des2" width="300" height="205" class="aligncenter size-medium wp-image-279" /></a><br />
Note : You can add additional line, text, etc as you like.</p>
<p><b>2. Integrate it with Query</b><br />
Click on the button with this icon : <a href="http://kristantohans.files.wordpress.com/2010/02/ico1.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/ico1.jpg?w=645" alt="" title="ico1"   class="alignnone size-full wp-image-282" /></a><br />
You will see a query window. Type this query on the text area (note that this is SQL query, not Hibernate query, JPQL, etc.)</p>
<p><pre class="brush: sql;">
SELECT employee_id AS &quot;E_ID&quot;, employee_name AS &quot;E_NAME&quot;, salary AS &quot;E_SALARY&quot; FROM employees
</pre></p>
<p>Let&#8217;s analyze the code above. I&#8217;m sure that all of you must be familiar with this code. But one thing you have to know that, in JasperReport, <b>ALIAS will be converted automatically into FIELDS</b>. In this case, you have 3 aliases, E_ID, E_NAME, and E_SALARY. All of these will be converted into JasperReport FIELDS Variable, so that you can place these elements in this design.</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/02/field.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/field.jpg?w=645" alt="" title="field"   class="aligncenter size-full wp-image-286" /></a></p>
<p>Next, place these 3 elements into your design (Dont forget, put these in <b>Details</b> Section), just simply like this :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/02/des3.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/des3.jpg?w=300&#038;h=159" alt="" title="des3" width="300" height="159" class="aligncenter size-medium wp-image-289" /></a></p>
<p><b>3. Testing your report</b><br />
Click on preview button in the toolbar. If you work in the right way, you will see display like this :</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/02/display.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/display.jpg?w=300&#038;h=187" alt="" title="display" width="300" height="187" class="aligncenter size-medium wp-image-291" /></a></p>
<p>The report works fine. Remember, whenever you clicked on Preview, the iReport will automatically compile the report from .jrxml into .jasper. The .jasper file is the generated object that you can use it and directly integrate it with the application.</p>
<p>Note : for iReport 3.7.0 user, you have to change the default language from Groovy to Java. Right click on your report name node in the left side, choose properties, and change the language from Groovy to Java.</p>
<p>Let&#8217;s move on to Netbeans.</p>
<p><b>4. Create a new Java Application Project and Insert JasperReport library</b><br />
Create the java application first. Uncheck the <b>Create Main Class</b> option. After that, add JasperReport library and MySQL JDBC Driver to your project (Right click on the library node of your project, add new library)as follow :</p>
<div id="attachment_294" class="wp-caption aligncenter" style="width: 237px"><a href="http://kristantohans.files.wordpress.com/2010/02/add.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/add.jpg?w=645" alt="" title="add"   class="size-full wp-image-294" /></a><p class="wp-caption-text">Add New Library</p></div>
<p>Add JasperReport library &amp; MySQL JDBC Driver on it. You will see like this once you get done : </p>
<p><a href="http://kristantohans.files.wordpress.com/2010/02/libr.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/libr.jpg?w=300&#038;h=217" alt="" title="libr" width="300" height="217" class="aligncenter size-medium wp-image-297" /></a></p>
<p>Next, create 2 package in your <b>Source Packages</b>, 1 package to place your report, the other one to place your main application. Give it name : </p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/des.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/des.jpg?w=645" alt="" title="des"   class="aligncenter size-full wp-image-308" /></a></p>
<p>Move your .jasper file into your report package. </p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/lib3.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/lib3.jpg?w=645" alt="" title="lib3"   class="aligncenter size-full wp-image-301" /></a></p>
<p>Insert a main class into your application package.</p>
<p><a href="http://kristantohans.files.wordpress.com/2010/03/lib5.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/lib5.jpg?w=645" alt="" title="lib5"   class="aligncenter size-full wp-image-304" /></a></p>
<p><b>5. Code your application</b></p>
<p>Open your main class, and insert this code to your class (i will explain it component per component) :</p>
<p><pre class="brush: java;">
package id.hans.employee.application;

import java.awt.Dimension;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.JFrame;
import net.sf.jasperreports.engine.JRException;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.swing.JRViewer;

/**
 *
 * @author Hans Kristanto
 */
public class MainApplication {

    Connection conn = null;

    public void initConnection(){
       
        String HOST = &quot;jdbc:mysql://localhost:3306/DATABASE_NAME&quot;;
        String USERNAME = &quot;YOUR_MYSQL_USERNAME&quot;;
        String PASSWORD = &quot;YOUR_MYSQL_PASSWORD&quot;;
        try {
            Class.forName(&quot;com.mysql.jdbc.Driver&quot;);
        } catch (ClassNotFoundException ex) {
            ex.printStackTrace();
        }

        try {
            conn = DriverManager.getConnection(HOST, USERNAME, PASSWORD);
        } catch (SQLException ex) {
            ex.printStackTrace();
        }
    }

    public void showReport(){
        
        //Path to your .jasper file in your package
        String reportName = &quot;id/hans/employee/report/EmployeeReport.jasper&quot;;
        
        //Get a stream to read the file
        InputStream is = this.getClass().getClassLoader().getResourceAsStream(reportName);

        try {
	 //Fill the report with parameter, connection and the stream reader		
            JasperPrint jp = JasperFillManager.fillReport(is, null, conn);
	    
  	 //Viewer for JasperReport
            JRViewer jv = new JRViewer(jp);
	
	 //Insert viewer to a JFrame to make it showable
            JFrame jf = new JFrame();
            jf.getContentPane().add(jv);
            jf.validate();
            jf.setVisible(true);
            jf.setSize(new Dimension(800,600));
            jf.setLocation(300,100);
            jf.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        } catch (JRException ex) {
            ex.printStackTrace();
        }
    }

    public static void main(String[] args) {

        MainApplication ma = new MainApplication();
        ma.initConnection();
        ma.showReport();
    }

}

</pre></p>
<p>If no problem occured, you will see display like this : </p>
<div id="attachment_316" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/03/report-1.jpg"><img src="http://kristantohans.files.wordpress.com/2010/03/report-1.jpg?w=300&#038;h=225" alt="" title="report-1" width="300" height="225" class="size-medium wp-image-316" /></a><p class="wp-caption-text">Your Report display. Cool isn't it?</p></div>
<p>Congratulations! you&#8217;ve created your first JasperReport application!</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/274/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/274/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/274/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=274&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/03/01/new-to-jasperreport-build-your-first-impressive-application-part-2/feed/</wfw:commentRss>
		<slash:comments>29</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/repot-1.jpg?w=300" medium="image">
			<media:title type="html">repot-1</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/des2.jpg?w=300" medium="image">
			<media:title type="html">des2</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/ico1.jpg" medium="image">
			<media:title type="html">ico1</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/field.jpg" medium="image">
			<media:title type="html">field</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/des3.jpg?w=300" medium="image">
			<media:title type="html">des3</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/display.jpg?w=300" medium="image">
			<media:title type="html">display</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/add.jpg" medium="image">
			<media:title type="html">add</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/libr.jpg?w=300" medium="image">
			<media:title type="html">libr</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/des.jpg" medium="image">
			<media:title type="html">des</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/lib3.jpg" medium="image">
			<media:title type="html">lib3</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/lib5.jpg" medium="image">
			<media:title type="html">lib5</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/03/report-1.jpg?w=300" medium="image">
			<media:title type="html">report-1</media:title>
		</media:content>
	</item>
		<item>
		<title>New to JasperReport : Build your first impressive application (part 1)</title>
		<link>http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-build-your-first-impressive-application-part-1/</link>
		<comments>http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-build-your-first-impressive-application-part-1/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 13:22:34 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[basic report with java]]></category>
		<category><![CDATA[jasper]]></category>
		<category><![CDATA[jasper report]]></category>
		<category><![CDATA[jasper report basic]]></category>
		<category><![CDATA[java pdf]]></category>
		<category><![CDATA[java report]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[report with java]]></category>
		<category><![CDATA[tutorial jasper report]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=240</guid>
		<description><![CDATA[I&#8217;ve made a previous article about setting up your environment to be a &#8220;JasperReport-ready&#8221;. You can click here to recall it. And now, in this article, i will guide you to build your first JasperReport application. For this part, i will split this tutorial into 2 parts. 1. Let&#8217;s setup a dummy database. I&#8217;m using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=240&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve made a previous article about setting up your environment to be a &#8220;JasperReport-ready&#8221;. You can click <a target='_blank' href='http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-make-it-one-for-all-and-all-for-one/'>here</a> to recall it.</p>
<p>And now, in this article, i will guide you to build your first JasperReport application. For this part, i will split this tutorial into 2 parts.</p>
<p><b>1. Let&#8217;s setup a dummy database. I&#8217;m using MySQL 5.0. Suppose we have a database named db_jasper</b><br />
<pre class="brush: sql;">
CREATE TABLE employees (
    employee_id VARCHAR(6) NOT NULL PRIMARY KEY,
    employee_name VARCHAR(30),
    salary INT(6)
);

INSERT INTO employees VALUES ('E0001','Hans Kristanto',5000000);
INSERT INTO employees VALUES ('E0002','Conrad Alvin',3500000);
INSERT INTO employees VALUES ('E0003','Luna Hu',4500000);
INSERT INTO employees VALUES ('E0004','Jina Seo',3650000);
INSERT INTO employees VALUES ('E0005','Ivan Lu',4510000);
INSERT INTO employees VALUES ('E0006','Dennis Ewing',500000);
</pre></p>
<p><b>2. Start your iReport designer.</b><br />
<div id="attachment_242" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/ireport.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/ireport.jpg?w=300&#038;h=187" alt="" title="ireport" width="300" height="187" class="size-medium wp-image-242" /></a><p class="wp-caption-text">iReport designer main window</p></div></p>
<p><b>3. Create a new report template</b><br />
Click on <b>File -&gt; New</b>, then choose any template paper. For example, <b>Blank A4</b> (in iReport 3.7.0). For iReport 3.7.0 below, just follow the wizard as usual.<br />
<i>NOTES : For a while, never use Report Wizard! You have to do it manually.</i><br />
Give it name and directory to be saved. Click on finish.<br />
<div id="attachment_246" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/new-report.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/new-report.jpg?w=300&#038;h=221" alt="" title="new report" width="300" height="221" class="size-medium wp-image-246" /></a><p class="wp-caption-text">New Report</p></div></p>
<p><b>4. After that, you will see window like this</b><br />
<div id="attachment_255" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/report.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/report.jpg?w=300&#038;h=180" alt="" title="report" width="300" height="180" class="size-medium wp-image-255" /></a><p class="wp-caption-text">Report Designer</p></div></p>
<p>If you to the report designer, there are 7 sections. I will explain it one by one :</p>
<ul>
<li><b>Title</b> : is section for placing title document. Title document will only appear on the first page of document.</li>
<li><b>Page Header</b> : is section for placing page header, for example, page number, title, etc. This header will appear in every page of report but not in the first page.</li>
<li><b>Column Header</b> : is section for placing column header for detail title, for example, Employee Name, Salary. You will see the different in the real application.</li>
<li><b>Details</b> : is section where you place all data. Detail section will iterate as much as fetched data. Again, you will see how it works in the real application.</li>
<li><b>Column Footer</b> : similar with Column Header, but placed in the foot.</li>
<li><b>Page Footer</b> : similar with Page Header, but placed in the foot.</li>
<li><b>Summary</b> : is section where you put all summarize. For example, summary of total employees, total profits/loss, etc.</li>
</ul>
<p>You have to understand these 7 sections first before we continue to the next step. Already understand? let&#8217;s go ahead!</p>
<p><b>5. Create a datasource</b><br />
in the toolbar, you will see an database icon with a plug in front of it. <a href="http://kristantohans.files.wordpress.com/2010/02/plug.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/plug.jpg?w=645" alt="" title="plug"   class="alignnone size-full wp-image-261" /></a>. You will see a new window appear : </p>
<p><a href="http://kristantohans.files.wordpress.com/2010/02/connection.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/connection.jpg?w=294&#038;h=300" alt="" title="connection" width="294" height="300" class="aligncenter size-medium wp-image-263" /></a></p>
<p>Click on <b>New</b> button on the right side, then follow the wizard. My suggestion :<br />
- use Database JDBC Connection.<br />
- give it name afterward.<br />
- use com.mysql.jdbc.Driver as the JDBC Driver.<br />
- type your database name on JDBC URL e.g. : jdbc:mysql://localhost/db_jasper<br />
- type your username and password.</p>
<p>After that, you will see the drop down next to the database icon will be set into our new datasource : <div id="attachment_266" class="wp-caption alignnone" style="width: 299px"><a href="http://kristantohans.files.wordpress.com/2010/02/drop.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/drop.jpg?w=645" alt="" title="drop"   class="size-full wp-image-266" /></a><p class="wp-caption-text">New DataSource</p></div></p>
<p>Everything is done for setting up. Let&#8217;s continue for the next core tutorial on the part 2.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/240/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/240/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/240/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=240&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-build-your-first-impressive-application-part-1/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/ireport.jpg?w=300" medium="image">
			<media:title type="html">ireport</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/new-report.jpg?w=300" medium="image">
			<media:title type="html">new report</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/report.jpg?w=300" medium="image">
			<media:title type="html">report</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/plug.jpg" medium="image">
			<media:title type="html">plug</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/connection.jpg?w=294" medium="image">
			<media:title type="html">connection</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/drop.jpg" medium="image">
			<media:title type="html">drop</media:title>
		</media:content>
	</item>
		<item>
		<title>New to JasperReport : Make it one for all and all for one</title>
		<link>http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-make-it-one-for-all-and-all-for-one/</link>
		<comments>http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-make-it-one-for-all-and-all-for-one/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 11:20:12 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[basic report with java]]></category>
		<category><![CDATA[jasper]]></category>
		<category><![CDATA[jasper report]]></category>
		<category><![CDATA[jasper report basic]]></category>
		<category><![CDATA[java pdf]]></category>
		<category><![CDATA[java report]]></category>
		<category><![CDATA[report]]></category>
		<category><![CDATA[report with java]]></category>
		<category><![CDATA[tutorial jasper report]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=206</guid>
		<description><![CDATA[Reporting is a critical element that almost every application, either it&#8217;s desktop or web based should have. Almost all application developer focused on how to make strong reliable application, but they somewhat forget about this section. Today i will make a basic tutorial for an application that could be integrated into reporting engine, in this [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=206&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Reporting is a critical element that almost every application, either it&#8217;s desktop or web based should have. Almost all application developer focused on how to make strong reliable application, but they somewhat forget about this section. Today i will make a basic tutorial for an application that could be integrated into reporting engine, in this case, i will use JasperReport + Java. </p>
<p>Before we start to the core of this tutorial, i will show you how to make your PC/Laptop a &#8220;JasperReport-Ready&#8221;. Things that you should have to prepare :</p>
<p><b>1. Netbeans IDE</b><br />
Netbeans is an integrated development environment (IDE) for Java, PHP, C/C++, Ruby, Python. You can download the latest release <a target='_blank' href='http://netbeans.org/downloads/index.html'>here</a></p>
<p><b>2. iReport Designer</b><br />
iReport is a JasperReport designer. With this, you can build your preferable report, design it as your favourite, and integrate it into database. you can download the latest release <a target='_blank' href='http://jasperforge.org//website/ireportwebsite/IR%20Website/ir_download.html?header=project&amp;target=ireport'>here</a></p>
<p><b>3. JasperReport library</b><br />
JasperReport is the core engine of reporting library. You can download the library <a target='_blank' href='http://jasperforge.org/projects/jasperreports'>here</a> (need authentication). The dependencies libraries are :</p>
<ul>
<li><a target='_blank' href='http://commons.apache.org/beanutils/'>commons-beanutils.jar</a></li>
<li><a target='_blank' href='http://commons.apache.org/digester/'>commons-digester.jar</a></li>
<li><a target='_blank' href='http://commons.apache.org/collections/'>commons-collections.jar</a></li>
<li><a target='_blank' href='http://commons.apache.org/logging/'>commons-logging.jar</a></li>
<li><a target='_blank' href='http://sourceforge.net/projects/itext/files/'>iText-latest-version.jar</a></li>
</ul>
<p>After you&#8217;ve done downloaded such many things, let&#8217;s make your PC &#8220;JasperReport-ready&#8221;. Follow these steps :</p>
<p><b>1. Install Netbeans IDE latest version</b><br />
<b>2. Install iReport designer</b><br />
<b>3. Once you&#8217;ve installed these 2, follow these special steps :</b></p>
<ul>
<li>Open your netbeans IDE</li>
<li>Click <b>Tools-&gt;Libraries</b> as follows :
</li>
<p></p>
<div id="attachment_214" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/library.jpg" target='_blank'><img src="http://kristantohans.files.wordpress.com/2010/02/library.jpg?w=450&#038;h=300" alt="nb-library" title="netbeans library" width="450" height="300" class="size-medium wp-image-214" /></a><p class="wp-caption-text">Netbeans IDE</p></div>
<li>A new <b>Library Manager</b> window will appear. Click on <b>New Library..</b> button</li>
<li>Type JasperReport on <b>Library Name</b> (you can use any other name as you like) :<br />
<br />
<div id="attachment_221" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/new-lib.jpg" target="_blank"><img src="http://kristantohans.files.wordpress.com/2010/02/new-lib.jpg?w=300&#038;h=174" alt="new-lib" title="new-lib" width="300" height="174" class="size-medium wp-image-221" /></a><p class="wp-caption-text">New Library</p></div>
</li>
<li>After that, you will back to <b>Library Manager</b> window. Choose your new jasper report library on Libraries list. Click on <b>Add Jar/Folder</b> button on the right side. Add JasperReport library and all dependencies library. Once it done, you will see a window like this :<br />
<br />
<div id="attachment_231" class="wp-caption aligncenter" style="width: 310px"><a href="http://kristantohans.files.wordpress.com/2010/02/library-manager.jpg"><img src="http://kristantohans.files.wordpress.com/2010/02/library-manager.jpg?w=300&#038;h=226" alt="" title="library-manager" width="300" height="226" class="alignleft size-medium wp-image-222" /></a><p class="wp-caption-text">Library Manager</p></div></p>
</li>
<li>Click OK, then your IDE is ready for JasperReport development!</li>
</ul>
<p>Have Fun! </p>
<p><a href='http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-build-your-first-impressive-application-part-1/'>continue to the next step</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=206&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/02/27/new-to-jasperreport-make-it-one-for-all-and-all-for-one/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/library.jpg?w=300" medium="image">
			<media:title type="html">netbeans library</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/new-lib.jpg?w=300" medium="image">
			<media:title type="html">new-lib</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/02/library-manager.jpg?w=300" medium="image">
			<media:title type="html">library-manager</media:title>
		</media:content>
	</item>
		<item>
		<title>Seminar dan Demo WiMAX ITHB bersama Onno W.Purbo</title>
		<link>http://kristantohans.wordpress.com/2010/01/26/seminar-dan-demo-wimax-ithb-bersama-onno-w-purbo/</link>
		<comments>http://kristantohans.wordpress.com/2010/01/26/seminar-dan-demo-wimax-ithb-bersama-onno-w-purbo/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 14:02:00 +0000</pubDate>
		<dc:creator>Hans Kristanto</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hariff]]></category>
		<category><![CDATA[iec]]></category>
		<category><![CDATA[internet]]></category>
		<category><![CDATA[ithb]]></category>
		<category><![CDATA[onno]]></category>
		<category><![CDATA[purbo]]></category>
		<category><![CDATA[seminar]]></category>
		<category><![CDATA[wimax]]></category>

		<guid isPermaLink="false">http://kristantohans.wordpress.com/?p=191</guid>
		<description><![CDATA[Tanpa terasa, internet telah menjadi bagian kehidupan kita sehari-hari. Penggunaan internet pun tidak lagi terbatas hanya untuk edukasi namun juga hiburan serta berbagai macam aplikasi interaktif yang ada di dunia maya ini. Kebutuhan akan transfer data yang cepat pun menjadi tuntutan utama dalam berinternet baik bagi kebutuhan edukasi, hiburan dan bisinis. Namun sangat disayangkan kebutuhan [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=191&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tanpa terasa, internet telah menjadi bagian kehidupan kita sehari-hari. Penggunaan internet pun tidak lagi terbatas hanya untuk edukasi namun juga hiburan serta berbagai macam aplikasi interaktif yang ada di dunia maya ini. Kebutuhan akan transfer data yang cepat pun menjadi tuntutan utama dalam berinternet  baik bagi kebutuhan edukasi, hiburan dan bisinis.</p>
<p>Namun sangat disayangkan kebutuhan akan akses internet yang cepat di Indonesia belum dapat terpenuhi, oleh karena itu diperlukan suatu teknologi berinternet yang lebih cepat dengan jangkauan area lebih luas namun ekonomis. Wi Max merupakan salah satu teknologi wireless internet yang dapat menjawab permasalahan tersebut. Sekedar informasi singkat Wi Max merupakan suatu teknologi penerus Wi Fi dengan jangkauan lebih luas (mencapai 10 kilometer) dan dengan kecepatan jauh lebih cepat dari Wi Fi.</p>
<p>Jika Anda penasaran mengenai teknologi Wi Max yang akan hadir tahun 2010 ini di Indonesia, mari bersama-sama kita menghadiri <strong>Seminar dan Demo Wi MAX ITHB bersama Onno W. Purbo</strong>. Seminar ini akan dibawakan langsung oleh salah seorang pakar yang sudah tidak asing lagi bagi kita semua yaitu: <strong>Onno W. Purbo</strong>. Seminar ini akan diadakan pada:</p>
<p><strong>Hari / Tanggal : Sabtu / 6 Februari 2010</strong></p>
<p><strong>Tempat               : Institut Teknologi Harapan Bangsa  Jl. Dipatiukur no 80-84, Bandung</strong></p>
<p><strong> </strong></p>
<p>Waktu                 : Pukul 09:00 – 15:00</p>
<p>Pembicara        : Onno W. Purbo</p>
<p><strong>Tema                  : Wi Max The Future Connection</strong></p>
<p>Seminar dan demo Wi Max ini, juga akan dimeriahkan dengan adanya demo wi max , seperti streaming video, teleconference, game Online, dan masih banyak lagi, yang dapat Anda coba secara langsung secara <strong>GRATISS!!!!!</strong> Selain demo kami juga memberikan <strong>sertifikat dengan biaya tambahan Rp.10.000</strong>.</p>
<p>Maka dari itu sekali lagi saya ingin mengajak Anda semua untuk menyambut dan mengenal lebih jauh mengenai Wi MAX pada Seminar dan Demo Wi MAX ITHB bersama Onno W. Purbo. Sekali lagi , SEMINAR INI GRATIS!!!!!!!<br />
<strong><br />
Untuk reservasi sertifikat dan tempat Anda dapat menghubungi kami di :</strong></p>
<p><strong>iki (08561311488)<br />
irene (081808115093)<br />
amorsa (08997979131)</strong></p>
<p><strong> </strong></p>
<p><strong>atau langsung klik di <a href="http://semwimaxithb.orgfree.com/">di sini</a></strong></p>
<p>Seminar ini merupakan hasil kerja sama dari Institut Teknologi Harapan Bangsa ,  PT. Hariff Daya Tunggal Engineering, dan IEC (Himpunan Mahasiswa Informatika ITHB)</p>
<table>
<tbody>
<tr>
<td valign="middle"><a href="http://kristantohans.files.wordpress.com/2010/01/logo-ithb-final-juni-2002-color.jpg"><img class="aligncenter size-full wp-image-197" title="logo-ithb-final-juni-2002-color" src="http://kristantohans.files.wordpress.com/2010/01/logo-ithb-final-juni-2002-color.jpg?w=645" alt=""   /></a></td>
<td valign="middle"><a style="text-decoration:none;" href="http://kristantohans.files.wordpress.com/2010/01/logo-iec.jpg"><img class="aligncenter size-full wp-image-194" title="logo-iec" src="http://kristantohans.files.wordpress.com/2010/01/logo-iec.jpg?w=645" alt=""   /></a></td>
<td valign="middle"><a href="http://kristantohans.files.wordpress.com/2010/01/harif.png"><img class="aligncenter size-medium wp-image-196" title="harif" src="http://kristantohans.files.wordpress.com/2010/01/harif.png?w=150&#038;h=117" alt="" width="150" height="117" /></a></td>
</tr>
</tbody>
</table>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/kristantohans.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/kristantohans.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/kristantohans.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/kristantohans.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/kristantohans.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/kristantohans.wordpress.com/191/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/kristantohans.wordpress.com/191/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/kristantohans.wordpress.com/191/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=kristantohans.wordpress.com&amp;blog=5847526&amp;post=191&amp;subd=kristantohans&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://kristantohans.wordpress.com/2010/01/26/seminar-dan-demo-wimax-ithb-bersama-onno-w-purbo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">hanskristanto</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/01/logo-ithb-final-juni-2002-color.jpg" medium="image">
			<media:title type="html">logo-ithb-final-juni-2002-color</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/01/logo-iec.jpg" medium="image">
			<media:title type="html">logo-iec</media:title>
		</media:content>

		<media:content url="http://kristantohans.files.wordpress.com/2010/01/harif.png?w=300" medium="image">
			<media:title type="html">harif</media:title>
		</media:content>
	</item>
	</channel>
</rss>
