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

<channel>
	<title>agimatec &#187; JasperReports</title>
	<atom:link href="http://www.agimatec.de/blog/tag/jasperreports/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agimatec.de/blog</link>
	<description>Clash of realities</description>
	<lastBuildDate>Tue, 22 Dec 2009 16:50:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Produktmanagement via Google Analytics</title>
		<link>http://www.agimatec.de/blog/2008/05/produktmanagement-via-google-analytics/</link>
		<comments>http://www.agimatec.de/blog/2008/05/produktmanagement-via-google-analytics/#comments</comments>
		<pubDate>Tue, 27 May 2008 08:34:26 +0000</pubDate>
		<dc:creator>Fabian Crabus</dc:creator>
				<category><![CDATA[Deutsch]]></category>
		<category><![CDATA[JasperReports]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.agimatec.de/blog/?p=132</guid>
		<description><![CDATA[Offensichtlich benötigt die Welt eine Alternative zu JasperReports oder zumindest eine vernünftige Dokumentation hierfür. Es ist frustrierend: wir schreiben die tollsten Artikel über die spannendsten Themen der Entwicklerwelt. Und? Wonach suchen die Leute? Laut Google Analytics: JasperReports. Tausende Suchanfragen dazu wie welche Attribute zu setzen sind. Wie welche Charttypen zu erzeugen sind. Ja, natürlich. Jasper [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/05/istock_000004978052xsmall.jpg"><img class="alignleft size-medium wp-image-133" title="istock_000004978052xsmall" src="http://www.agimatec.de/blog/wp-content/uploads/2008/05/istock_000004978052xsmall.jpg" alt="" width="300" height="199" /></a>Offensichtlich benötigt die Welt eine Alternative zu JasperReports oder zumindest eine vernünftige Dokumentation hierfür. Es ist frustrierend: wir schreiben die tollsten Artikel über die spannendsten Themen der Entwicklerwelt. Und? Wonach suchen die Leute? Laut Google Analytics: JasperReports. Tausende Suchanfragen dazu wie welche Attribute zu setzen sind. Wie welche Charttypen zu erzeugen sind.</p>
<p>Ja, natürlich. Jasper ist schon nett. Aber hey. Es ist auch vergleichsweise grottig. Die Reports fühlen sich im Vergleich zu unseren ajaxy Oberflächen altbacken an. Es mag ja sein, dass es ultra-flexibel ist (und das stimmt). Nur: die Reports sind nicht schön. Sie sind nicht dynamisch. Sie sind einfach lahm.</p>
<p>Aber was lernen wir daraus: wir entwickeln eine Alternative. Nicht so umfangreich. Nicht so viele Features. Schöne einfache Charts und Reports. Die aber schlicht gut aussehen:</p>
<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/05/istock_000004878226small.jpg"><img class="aligncenter size-full wp-image-134" title="graphs and charts" src="http://www.agimatec.de/blog/wp-content/uploads/2008/05/istock_000004878226small.jpg" alt="" width="499" height="332" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.agimatec.de/blog/2008/05/produktmanagement-via-google-analytics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zahlensalat: JasperReports, iReports und andere Wege, sich den Tag zu versauen (Start iReport FAQ)</title>
		<link>http://www.agimatec.de/blog/2008/04/zahlensalat-jasperreports-ireports-und-andere-wege-sich-den-tag-zu-versauen-start-ireport-faq/</link>
		<comments>http://www.agimatec.de/blog/2008/04/zahlensalat-jasperreports-ireports-und-andere-wege-sich-den-tag-zu-versauen-start-ireport-faq/#comments</comments>
		<pubDate>Mon, 14 Apr 2008 17:53:47 +0000</pubDate>
		<dc:creator>Fabian Crabus</dc:creator>
				<category><![CDATA[Deutsch]]></category>
		<category><![CDATA[iReport]]></category>
		<category><![CDATA[JasperReports]]></category>
		<category><![CDATA[Rant]]></category>

		<guid isPermaLink="false">http://www.agimatec.de/blog/?p=54</guid>
		<description><![CDATA[Gleich zu Beginn: JasperReports ist super. In Zeiten von Ajax, Flex und Co nicht mehr so ganz zeitgemäß, aber eben doch schnell eingesetzt. Nur habe ich heute den ganzen Tag (und es kam mir noch wesentlich länger vor) Reports erstellt. Schöne Tabellen, schicke Charts. Feine Sache. Aber es ist wirklich langweilig. Und zwar auch so [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-medium wp-image-52" style="float: left;" title="Business Woman Climbing a Pile of Files" src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/istock_000004216447xsmall.jpg" alt="" width="258" height="300" />Gleich zu Beginn: <a href="http://jasperforge.org/sf/projects/jasperreports">JasperReports</a> ist super. In Zeiten von Ajax, Flex und Co nicht mehr so ganz zeitgemäß, aber eben doch schnell eingesetzt. Nur habe ich heute den ganzen Tag (und es kam mir noch wesentlich länger vor) Reports erstellt. Schöne Tabellen, schicke Charts. Feine Sache. Aber es ist wirklich langweilig.</p>
<p>Und zwar auch so offensichtlich langweilig, dass sich kein anderer dauerhaft erbarmen wollte, mich zu erlösen und den Part übernommen hätte (team spirit, pah! :)). Und am Ende habe ich auch noch den Fehler gemacht, ein Buch zu <a href="http://jasperforge.org/sf/projects/iReport">iReport</a> &#8211; dem Jasper Designtool &#8211; zu kaufen (fünf Minuten durchblättern, dann festgestellt, dass der Autor das Ding auf meinem Wissensstand geschrieben hatte&#8230;super). Mir ging&#8217;s hierbei ähnlich wie bei meinen kurzen Ausflügen zu <a href="http://www.pentaho.org">Pentaho</a> (&#8220;full-blown&#8221; Business Intelligence Suite): Reporting/BI-Tools haben einen anderen Nutzerkreis.</p>
<p>Sie wollen so einfach zu nutzen sein, dass man keine Programmierkenntnisse haben muss, können&#8217;s aber nicht so simpel machen, dass man es mit ausgeschabtem Schädelinneren schafft. In Summe musste ich halb mit iReports die Grundlagen erstellen, um später die andere Hälfte von Hand als XML für Jasper tunen zu können. Das sind nebenbei allerdings Frustrationen, die ich auch locker auf alle SOA-Oberflächen-Tools anwenden kann (ja, ich schaue in Eure Richtung <a href="http://www.sopera.com">Sopera</a>, <a href="http://www.progress.com">Progress</a> &amp; Co). Marketingtechnisch sehr überzeugend, aber in der Praxis &#8211; ich halte mich hier zurück &#8211; nicht zu 100% tauglich (ja, schon richtig, mehr als &#8220;besser als nichts&#8221;, aber kein Ersatz für Grundlagenwissen).</p>
<p>Simon war allerdings so lieb, ein kleines Tutorial für iReport zu erstellen (in English)&#8230;das hält die Frustrationen in Grenzen&#8230;ok, Tutorial ist übertrieben&#8230;FAQ passt besser&#8230;</p>
<p><span id="more-54"></span></p>
<h3>iReport</h3>
<p>iReport is a report designer for JasperReports &#8211; it let&#8217;s you edit reports visually with a nearly WYSIWYG UI. It let&#8217;s you work on JasperReports &#8220;Source&#8221;-Files.</p>
<p>Actually in JasperReports there are two types of files</p>
<ul class="alternate" type="square">
<li>.jrxml</li>
<li>.jasper</li>
</ul>
<p>jrxml-Files are xml-Files which describe how the report looks like and how data should be accessed (e.g. via an SQL query). jasper-Files are compiled and can&#8217;t be changed any more. Like a Java source file (*.java) and a compiled class (*.class). So in an essence: you edit *.jrxml-Files in iReport.</p>
<p>More about the file types in iReport:<br />
<span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Files_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Files_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<p><strong>Define the data source</strong></p>
<p>You need a data source to execute your report within iReport. A data source could be a JDBC connection, a XML file or something else. But let&#8217;s just stick to JDBC for now.<br />
To define a JDBC data source you need the following steps:</p>
<ul class="alternate" type="square">
<li>Start iReport</li>
<li>Go to Data -&gt; Connections/Data Sources</li>
<li>New -&gt; Database JDBC Connection</li>
<li>Insert connection data (example screenshot for a local Postgresql database. Don&#8217;t forget to insert the database driver as described in the FAQ)</li>
</ul>
<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-db.jpg"><img class="aligncenter size-medium wp-image-53" title="ireport-db" src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-db.jpg" alt="" width="252" height="300" /></a></p>
<p>To get more information about how to configure the datasource, watch the screencast <span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Datasource_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Datasource_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<h3>Bands</h3>
<p>If you create a new report you&#8217;ll notice that the sheet is divided into different &#8220;bands&#8221;: title, page header, column header, detail, column footer, page footer, last page footer, summary.<br />
Each has a distinct function:<br />
Whatever you put into the title will be displayed once at the start of the document, what&#8217;s in the page header once every page, column header is used as a static element for the following detail band. The detail band is used for the &#8220;real&#8221; report data &#8211; variable fields should be placed here &#8211; it&#8217;s for any kind of tabular data. In the same way column footer, page footer, last page footer bands are used. Uhm, actually quite self-explanatory (once understood and fully digested&#8230;after a few weeks).</p>
<p>But then it&#8217;s quite easy to start formatting fields and designing a complete report.</p>
<h3>Formatting Fields</h3>
<p><span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Formatting_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Formatting_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<h3>Groups</h3>
<p><span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Groups_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Groups_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<h3><a name="iReport-Parameters"></a>Parameters</h3>
<p><span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Parameters_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Parameters_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<h3><a name="iReport-ReportWizard"></a>Report Wizard</h3>
<p><span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Report_Wizard_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Report_Wizard_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<h3><a name="iReport-Subreports"></a>Subreports</h3>
<p><span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Subreport_viewlet_swf.htm">http://www.jasperforge.org/images/stories/Documentation/ireports/swf/Subreport_viewlet_swf.htm<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<h3><a name="iReport-Createcharts"></a>Create charts</h3>
<p>To create charts you need to click on the chart icon in the middle of the first button line. The cursor on the workspace is changing to a cross and you can span a rectangle in the size of the chart.<br />
If you release the left button, a dialog appears, where you can select the type of chart.</p>
<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-chart.jpg"><img class="alignnone size-medium wp-image-56" title="ireport-chart" src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-chart.jpg" alt="" width="300" height="300" /></a></p>
<h4>Pie (3d) chart</h4>
<p>If you select the Pie chart, you can configure it in the following way:</p>
<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-chart-properties.jpg"><img class="alignnone size-medium wp-image-57" title="ireport-chart-properties" src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-chart-properties.jpg" alt="" width="244" height="300" /></a></p>
<ul class="alternate" type="square">
<li>Key Expression
<ul class="alternate" type="square">
<li>Insert the expression for the key, which belongs to the value</li>
<li>Example: if it is a SQL query it could be a delivery machine
<div class="code">
<div class="codeContent">
<pre class="code-java">$F{delivery_machine_identification}</pre>
</div>
</div>
</li>
</ul>
</li>
<li>Value Expression
<ul class="alternate" type="square">
<li>Insert the expression which results in the share of the pie</li>
<li>Example: if it a SQL query it could be something like
<div class="code">
<div class="codeContent">
<pre class="code-java">$F{share}</pre>
</div>
</div>
</li>
</ul>
</li>
<li>Label Expression
<ul class="alternate" type="square">
<li>Insert the expression which should be assigned to the labels of the pie chart</li>
<li>Could be empty, than the key is displayed or could be any other expression. Remember that Strings need to be Java Strings</li>
</ul>
</li>
</ul>
<h4><a name="iReport-Barchart"></a>Bar chart</h4>
<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-chart-bar.jpg"><img class="alignnone size-medium wp-image-55" title="ireport-chart-bar" src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/ireport-chart-bar.jpg" alt="" width="300" height="225" /></a></p>
<ul class="alternate" type="square">
<li>Series Expression
<ul class="alternate" type="square">
<li>The data of the x-Axis</li>
</ul>
</li>
<li>Category Expression
<ul class="alternate" type="square">
<li>The label of the x-Axis</li>
</ul>
</li>
<li>Value Expression
<ul class="alternate" type="square">
<li>The data of the y-Axis</li>
</ul>
</li>
<li>Label Expression
<ul class="alternate" type="square">
<li>Used nowhere (set data but couldn&#8217;t find it in the chart)</li>
</ul>
</li>
</ul>
<h2><a name="iReport-FAQ"></a>FAQ</h2>
<h3><a name="iReport-Thereisnochartgenerated"></a>There is no chart generated</h3>
<p>Charts are not working in every band of the report. Detail or Summary bands are ok.</p>
<h3>Exception when accessing data source</h3>
<p>If you install iReport from scratch your database driver is missing. For Postgres download it from <span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://jdbc.postgresql.org/download.html">http://jdbc.postgresql.org/download.html<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span>. If you need to access e.g. an oracle database or something else, try to find it in the internet. Normally you find matching drivers here: <span class="nobr"><a title="Visit page outside Confluence" rel="nofollow" href="http://developers.sun.com/product/jdbc/drivers">http://developers.sun.com/product/jdbc/drivers<sup><img class="rendericon" src="https://www.agimatec.de/confluence/images/icons/linkext7.gif" border="0" alt="" width="7" height="7" align="absmiddle" /></sup></a></span></p>
<p>You just need to place the driver in the directory iReport-2.0.3/lib/ and restart iReport.</p>
<h3><a name="iReport-Handlingmultivalueexpression(selectxfromywherezin..)"></a>Handling multi value expression (select x from y where z in ..)</h3>
<p>First: Define multi-value variable as Collection:</p>
<p><a href="http://www.agimatec.de/blog/wp-content/uploads/2008/04/collection-1.png"><img class="alignnone size-medium wp-image-58" title="collection-1" src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/collection-1-259x300.png" alt="" width="259" height="300" /></a></p>
<p>Then: add a \$X{} expression with values IN or NOTIN, column name, parameter name:</p>
<div class="code">
<div class="codeContent">
<pre class="code-java">select identification,

box_size,

sum(a_configured) as tech_capacity,

-sum(a_defect) as defect,

-sum(a_soiled) as soiled,

sum(a_configured - a_defect - a_soiled) as available,

-sum(a_occupied) as occupied,

-sum(a_reserved) as reserved,

sum(a_configured - a_defect - a_soiled - a_occupied - a_reserved) as free,

-sum(a_buffer) as buffer,

sum(a_configured - a_defect - a_soiled - a_occupied - a_reserved -a_buffer) as freeToReserve

from 	some_table

where   validTo &gt; ($P{validFrom})    -- kleinere Wert

and     validFrom &lt;=  ($P{validTo}) -- größere Wert

and     $X{IN, machine_identification,machineList}</pre>
</div>
</div>
<p>This gets expanded to:</p>
<div class="code">
<div class="codeContent">
<pre class="code-java">select identification,

box_size,

sum(a_configured) as tech_capacity,

-sum(a_defect) as defect,

-sum(a_soiled) as soiled,

sum(a_configured - a_defect - a_soiled) as available,

-sum(a_occupied) as occupied,

-sum(a_reserved) as reserved,

sum(a_configured - a_defect - a_soiled - a_occupied - a_reserved) as free,

-sum(a_buffer) as buffer,

sum(a_configured - a_defect - a_soiled - a_occupied - a_reserved -a_buffer) as freeToReserve

from 	some_table

where   validTo &gt; ($P{validFrom})    -- kleinere Wert

and     validFrom &lt;=  ($P{validTo}) -- größere Wert

and     machine_identification in (values of machineList)</pre>
</div>
</div>
<p>Bei Interesse erweitern wir&#8217;s gerne&#8230;ich kann aber auch ein paar Tage ohne iReport und Jasper auskommen :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agimatec.de/blog/2008/04/zahlensalat-jasperreports-ireports-und-andere-wege-sich-den-tag-zu-versauen-start-ireport-faq/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
