<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5198887997194448266</id><updated>2012-02-16T01:15:07.469-08:00</updated><category term='when no data'/><category term='SQL Qurey Execution'/><category term='iReport'/><category term='Database Connetion'/><category term='SQL'/><category term='iReport Guidelines'/><category term='Oracle Connection'/><category term='Oracle Driver'/><category term='Jasper Reports'/><category term='JDBC Connection'/><category term='Executing a Report'/><category term='Vertical Band Overflow'/><category term='iReport Rules'/><category term='Group by'/><category term='Report Display'/><category term='Overflow'/><title type='text'>iReport Guide</title><subtitle type='html'>A Guide to completing real world reports using iReport and Jasper.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>10</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-3431373912059419789</id><published>2008-07-15T00:39:00.000-07:00</published><updated>2008-07-15T00:44:37.768-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Vertical Band Overflow'/><category scheme='http://www.blogger.com/atom/ns#' term='Group by'/><title type='text'>Solution/ Workaround for Detail Band Not allowing Vertical Overflow</title><content type='html'>&lt;p class="MsoNormal"&gt;After a couple of hours of experimentation I discovered the easiest way to achieve detail &lt;a href="http://ireport-guide.blogspot.com/2008/07/deatails-section-not-allowing-vertical.html"&gt;band vertical overflow.&lt;/a&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;Technically speaking the detail band overflow is not achievable. But By Creating a Dummy Group and making the group repeat for all the records and placing it below all other groups you can get the desired result. Here’s the steps you need to take.&lt;br /&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;ol&gt;&lt;li&gt;Create a Dummy Group&lt;/li&gt;&lt;li&gt;Place it after all other groups&lt;/li&gt;&lt;li&gt;Put a unique key as the “Group Expression” (This way for each record will create a new group)&lt;/li&gt;&lt;li&gt;Put your display fields in the group header and remove the details section&lt;/li&gt;&lt;/ol&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-3431373912059419789?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/3431373912059419789/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/07/solution-workaround-for-detail-band-not.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/3431373912059419789'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/3431373912059419789'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/07/solution-workaround-for-detail-band-not.html' title='Solution/ Workaround for Detail Band Not allowing Vertical Overflow'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-2107117084986711282</id><published>2008-07-13T20:26:00.000-07:00</published><updated>2008-07-13T20:39:19.928-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Overflow'/><category scheme='http://www.blogger.com/atom/ns#' term='iReport'/><title type='text'>Deatails Section Not allowing Vertical Overflow</title><content type='html'>&lt;p class="MsoNormal"&gt;Recently I noticed something very interesting about iReport 2.0.0&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The “details” section does not allow vertical overflowing. Vertical overflowing is that adding extra lines below if ur field has more characters. But for some reason iReport does not allow it.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;If you want to print two lines in ur Details section u have to leave enough space for those lines to be printed. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;This is a major braw back in iReport as you would ultimately waste space for records that does not overflow. Hope iReport gives us this functionality in the near future.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-2107117084986711282?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/2107117084986711282/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/07/deatails-section-not-allowing-vertical.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/2107117084986711282'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/2107117084986711282'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/07/deatails-section-not-allowing-vertical.html' title='Deatails Section Not allowing Vertical Overflow'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-3284443754824127038</id><published>2008-05-23T22:12:00.000-07:00</published><updated>2008-05-23T22:39:29.281-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Report Display'/><category scheme='http://www.blogger.com/atom/ns#' term='when no data'/><title type='text'>Report Empty (Blank page is displayed) When No Data is present/retrieved: Solution</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;A Common Problem arising in Jasper Reports is when there’s no data retrieved A blank (white) page is displayed. This can be corrected in two ways&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The Easiest way is of course to correct it through iReport. Find out how to do it by &lt;a href="http://ireport-guide.blogspot.com/2008/04/basics.html"&gt;reading this&lt;/a&gt;.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;There’s another not-so-subtle way to do it. That is setting the option through Java Code.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Whatever the method we use to display our report, we would have to construct the JasperReport objet. Simply set the option like this:&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JasperReport jasperReport = (JasperReport) JRLoader.loadObject(jasperTemplateURL);&lt;/p&gt;  &lt;p class="MsoNormal"&gt;jasperReport.setWhenNoDataType(jasperReport.WHEN_NO_DATA_TYPE_ALL_SECTIONS_NO_DETAIL);&lt;/p&gt;  &lt;p class="MsoNormal"&gt;The Method setWhenNoDataType can be set three values. All Three are Constants in the JasperReport Object.&lt;/p&gt;  &lt;ul&gt;&lt;li&gt;jasperReport.WHEN_NO_DATA_TYPE_BLANK_PAGE&lt;/li&gt;&lt;li&gt;jasperReport.WHEN_NO_DATA_TYPE_NO_PAGES&lt;/li&gt;&lt;li&gt;jasperReport .WHEN_NO_DATA_TYPE_ALL_SECTIONS_NO_DETAIL&lt;/li&gt;&lt;/ul&gt;      &lt;p class="MsoNormal"&gt;We can use them to set it to any of the options we want.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-3284443754824127038?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/3284443754824127038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/05/report-empty-blank-page-is-displayed.html#comment-form' title='19 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/3284443754824127038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/3284443754824127038'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/05/report-empty-blank-page-is-displayed.html' title='Report Empty (Blank page is displayed) When No Data is present/retrieved: Solution'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><thr:total>19</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-1398247068108150404</id><published>2008-05-09T01:37:00.000-07:00</published><updated>2008-05-09T02:01:27.503-07:00</updated><title type='text'>How to execute a Jasper Report through a web app as a PDF and HTML</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;The most reliable and efficient way to execute a report through a web app (for this example I’ll be using servlets) is to have the report pre-compiled and ready. You can place ur SQL Qurrey inside the report itself or pass a java &lt;b style=""&gt;ResultSet&lt;/b&gt; object when creating a report.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;First you need to convert your compiled .jasper file to a java object. Jasper API provides the class called JasperReport for this purpose. We also need to know the templateURL (The physical location of the jasper file on the server)&lt;/p&gt;            &lt;p class="MsoNormal"&gt;import net.sf.jasperreports.engine.JRResultSetDataSource;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;import net.sf.jasperreports.engine.JasperCompileManager;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;import net.sf.jasperreports.engine.JasperFillManager;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;import net.sf.jasperreports.engine.JasperPrint;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;import net.sf.jasperreports.engine.JasperReport;&lt;br /&gt;import net.sf.jasperreports.engine.JasperReport;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;JasperReport jasperReport = (JasperReport) JRLoader.loadObject (templateURL);&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;Then Create the JasperPrint Object using the parameters and the resultset.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, new JRResultSetDataSource(resultSet));&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;resultSet&lt;span style=""&gt;  &lt;/span&gt;= the SQL result set containing your data.&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;Parameters = the HashMap containing your parameters.&lt;/p&gt;  &lt;p style="font-style: italic; font-weight: bold;" class="MsoNormal"&gt;Then Load a ByteStream and “Flush” The report&lt;/p&gt;                        &lt;p class="MsoNormal"&gt;OutputStream outputStream = servletResponse.getOutputStream();&lt;span style=""&gt;&lt;/span&gt;&lt;br /&gt;ByteArrayOutputStream baos = new ByteArrayOutputStream();&lt;br /&gt;JRPdfExporter exporter = new JRPdfExporter();&lt;span style=""&gt;&lt;/span&gt;&lt;br /&gt;exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);&lt;br /&gt;exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, baos);&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;exporter.exportReport();&lt;br /&gt;byteStream = baos.toByteArray();&lt;span style=""&gt;                                           &lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;outputStream.write(byteStream);&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;outputStream.flush();&lt;o:p&gt;&lt;/o:p&gt;&lt;br /&gt;outputStream.close();&lt;br /&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p style="font-style: italic;" class="MsoNormal"&gt;You can call this code and flush the contents to a new window or put it in the same screen.  For HTML Export you can use &lt;span style="font-weight: bold;"&gt;JRHtmlExporter instead of JRPdfExporter.&lt;/span&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-1398247068108150404?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/1398247068108150404/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/05/how-to-execute-jasper-report-through.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/1398247068108150404'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/1398247068108150404'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/05/how-to-execute-jasper-report-through.html' title='How to execute a Jasper Report through a web app as a PDF and HTML'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-5739885021353794205</id><published>2008-05-02T00:58:00.000-07:00</published><updated>2008-05-02T01:08:13.269-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iReport'/><category scheme='http://www.blogger.com/atom/ns#' term='Executing a Report'/><category scheme='http://www.blogger.com/atom/ns#' term='iReport Guidelines'/><title type='text'>How to Execute A Report using iReport</title><content type='html'>Assuming that you have your Data source ready (ie. A Query/Hibernate) It’s a simple matter to execute the report.  &lt;p class="MsoNormal"&gt;You can execute a Report either with data or without data. If you are going to view without data you need to set your “When No Data Type” to “All section No detail” as demonstrated here.&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5tb9fheHRJI/SBrLwIv1feI/AAAAAAAAACQ/I5-jkjoeH6U/s1600-h/ireport.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 541px; height: 54px;" src="http://2.bp.blogspot.com/_5tb9fheHRJI/SBrLwIv1feI/AAAAAAAAACQ/I5-jkjoeH6U/s400/ireport.JPG" alt="" id="BLOGGER_PHOTO_ID_5195689147967569378" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You can execute the report by using the Build&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt; Execute (Empty Data source) OR Build&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt; Execute (With Active Connection) in the Main Menu under Build. OR you can simply click the execute button which in the toolbar. (Which will be place on the right hand side by default).&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-5739885021353794205?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/5739885021353794205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/05/how-to-execute-report-using-ireport.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/5739885021353794205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/5739885021353794205'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/05/how-to-execute-report-using-ireport.html' title='How to Execute A Report using iReport'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_5tb9fheHRJI/SBrLwIv1feI/AAAAAAAAACQ/I5-jkjoeH6U/s72-c/ireport.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-445359662739995544</id><published>2008-04-29T02:06:00.000-07:00</published><updated>2008-04-29T02:30:48.810-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iReport Rules'/><category scheme='http://www.blogger.com/atom/ns#' term='iReport'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Qurey Execution'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='iReport Guidelines'/><title type='text'>How to Execute a SQL Query using iReport.</title><content type='html'>&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;Click Data --&gt; Report Query. The Following window will appear&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5tb9fheHRJI/SBblUIv1fdI/AAAAAAAAACI/_X1oQmD0Xas/s1600-h/reports1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 431px; height: 296px;" src="http://2.bp.blogspot.com/_5tb9fheHRJI/SBblUIv1fdI/AAAAAAAAACI/_X1oQmD0Xas/s400/reports1.JPG" alt="" id="BLOGGER_PHOTO_ID_5194591354326711762" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Type the SQL Query you want. To pass Parameters user $P{PARAMENTER_NAME} (in iReport 2.0 or higher). You can click the “Automatically Retrieve Fields” check box to retrieve the fields. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Keep in mind if there’s an SQL error the fields will not be retrieved and the SQL error will be displayed.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;You can also select the fields you want from a Database Model and generate the Query automatically. &lt;b style=""&gt;I DO NOT recommend this&lt;/b&gt;. Although you can set the conditions before hand I always find it reliable when I have a working Query in my hands. It’s always better to know that the query works. So create the query using SQL Navigator or a similar tool using sample data for “Parameters” and use that query.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Click OK after Fields are retrieved. &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-445359662739995544?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/445359662739995544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/how-to-execute-sql-query-using-ireport.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/445359662739995544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/445359662739995544'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/how-to-execute-sql-query-using-ireport.html' title='How to Execute a SQL Query using iReport.'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_5tb9fheHRJI/SBblUIv1fdI/AAAAAAAAACI/_X1oQmD0Xas/s72-c/reports1.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-7370512226966305147</id><published>2008-04-27T07:15:00.000-07:00</published><updated>2010-12-07T23:42:58.888-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Jasper Reports'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Driver'/><category scheme='http://www.blogger.com/atom/ns#' term='JDBC Connection'/><category scheme='http://www.blogger.com/atom/ns#' term='Database Connetion'/><category scheme='http://www.blogger.com/atom/ns#' term='iReport Guidelines'/><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Connection'/><title type='text'>How to Connect to a Database Or a Data Source using iReport</title><content type='html'>&lt;p class="MsoNormal"&gt;To connect to a data source using iReport you need to configure the Data source. To do that go to Data&lt;span style="font-family:Wingdings;"&gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt; Connection/Data Sources From the Main Menu items. &lt;/p&gt;    &lt;p class="MsoNormal"&gt;You would get the Connection/Data Sources Window. Click “New”&lt;o:p&gt;&lt;br /&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5tb9fheHRJI/SBSJ5Iv1fbI/AAAAAAAAABY/2eDPLce2jnw/s1600-h/ireport-datasource1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_5tb9fheHRJI/SBSJ5Iv1fbI/AAAAAAAAABY/2eDPLce2jnw/s400/ireport-datasource1.JPG" alt="" id="BLOGGER_PHOTO_ID_5193927884958694834" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;Most of the time you would be using a JDBC data source or a Hibernate Connection. For the sake of the first report we will look at the much simpler and common way of using a JDBC connection. To configure a JDBC connection click “JDBC Connection” and click “Next”&lt;br /&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_5tb9fheHRJI/SBSKAov1fcI/AAAAAAAAABg/RujHhOXReLo/s1600-h/ireport-datasource2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://2.bp.blogspot.com/_5tb9fheHRJI/SBSKAov1fcI/AAAAAAAAABg/RujHhOXReLo/s400/ireport-datasource2.JPG" alt="" id="BLOGGER_PHOTO_ID_5193928013807713730" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;To connect to a MySQL or a Oracle Database first you need to define a Driver. While iReport comes with a lot of dirvers it for some strange reason does not include an Oracle Driver. &lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;b style=""&gt;Connecting to MySQL&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Set your server path and data base name in the JDBC URL Wizard. Then Click Wizard and it will automatically set your JDBC URL. Make Sure you have selected the com.mysql.jdbc.Driver and Type the User name and password to the database and click Test.&lt;/p&gt;&lt;p class="MsoNormal"&gt; Your Data base connection should be working properly. If not check your MySQL database URL is correct or/and the database server is running properly. If the test is Successful click Save. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;b style=""&gt;Connecting to Oracle Database.&lt;o:p&gt;&lt;/o:p&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;As I mentioned above iReport does not have a Oracle JDBC driver included. To Connect to Oracle you need to have a Oracle JDBC Driver compliant with your Oracle Version. They can be &lt;a href="http://www.oracle.com/technology/software/tech/java/sqlj_jdbc/index.html"&gt;found here&lt;/a&gt;. I’ve used &lt;i style=""&gt;ojdbc14.jar&lt;/i&gt; with Oracle 9i and 10i. &lt;/p&gt;  &lt;p class="MsoNormal"&gt;Place the Oracle JDBC Driver in your lib directory. If you have installed using the default settings this would be in the c:/Programfiles/jaspersoft/ireport2.0.5 directory&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Set your Server Path and the database name in the JDBC URL wizard. Then click “Wizard” button and the Database URL would be set WITH THE PORT 1521. If you are not using that simply modify it to the port u are using in the JDBC URL Field. Type the User name and password to the database.&lt;/p&gt;  &lt;p class="MsoNormal"&gt;Set the JDBC Driver Field to “oracle.jdbc.driver.OracleDriver” and click test. If not successful check your username/password and Database URL and Try again. After the test is successful click Save.&lt;/p&gt;      &lt;p class="MsoNormal"&gt;Now you are ready to start designing a report.&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;b&gt;&lt;i&gt;UPDATE on 08 Dec 2010&lt;/i&gt;&lt;/b&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;A Better Example Through Comments (@author &lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 12px; color: rgb(153, 153, 153); line-height: 17px; "&gt;&lt;a href="http://www.blogger.com/profile/06171455345762699694" rel="nofollow" style="color: rgb(51, 102, 153); text-decoration: none; "&gt;prakash&lt;/a&gt;)&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;span class="Apple-style-span" style="font-family: Verdana, sans-serif; font-size: 12px; color: rgb(102, 102, 102); line-height: 17px; "&gt;Steps to set the Classpath for iReport:&lt;br /&gt;1) go to "Tools / Options" menu and select iReport&lt;br /&gt;2) verify that database JDBC driver is present:&lt;br /&gt;- Choose "Classpath" tab&lt;br /&gt;- Click "Add JAR" and then locate the mysql.jdbc.Driver&lt;br /&gt;- Click "OK"&lt;br /&gt;3) click "Connections / Datasources" icon in toolbar&lt;br /&gt;5) click "New" and set up a "Database JDBC Connection" using driver from step 2&lt;br /&gt;6) click "Test" to verify the data source works correctly&lt;br /&gt;7) click "Save" to save the data source&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-7370512226966305147?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/7370512226966305147/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/how-to-connect-to-database-or-data.html#comment-form' title='17 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/7370512226966305147'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/7370512226966305147'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/how-to-connect-to-database-or-data.html' title='How to Connect to a Database Or a Data Source using iReport'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5tb9fheHRJI/SBSJ5Iv1fbI/AAAAAAAAABY/2eDPLce2jnw/s72-c/ireport-datasource1.JPG' height='72' width='72'/><thr:total>17</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-4545189982499353042</id><published>2008-04-26T20:58:00.000-07:00</published><updated>2008-04-27T06:47:06.873-07:00</updated><title type='text'>Creating a New Report Using iReport</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;b style=""&gt;&lt;span style="line-height: 115%;"&gt;&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;br /&gt;The Basics.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;Click File &lt;/span&gt;&lt;span style=";font-family:Wingdings;font-size:100%;"  &gt;&lt;span style=""&gt;à&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt; New Document (or Ctrl+N). You will get the following window.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_5tb9fheHRJI/SBP9vYv1faI/AAAAAAAAABQ/cslusx2jgPU/s1600-h/example+1.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://4.bp.blogspot.com/_5tb9fheHRJI/SBP9vYv1faI/AAAAAAAAABQ/cslusx2jgPU/s400/example+1.JPG" alt="" id="BLOGGER_PHOTO_ID_5193773785827081634" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shapetype id="_x0000_t75" coordsize="21600,21600" spt="75" preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f"&gt;  &lt;v:stroke joinstyle="miter"&gt;  &lt;v:formulas&gt;   &lt;v:f eqn="if lineDrawn pixelLineWidth 0"&gt;   &lt;v:f eqn="sum @0 1 0"&gt;   &lt;v:f eqn="sum 0 0 @1"&gt;   &lt;v:f eqn="prod @2 1 2"&gt;   &lt;v:f eqn="prod @3 21600 pixelWidth"&gt;   &lt;v:f eqn="prod @3 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @0 0 1"&gt;   &lt;v:f eqn="prod @6 1 2"&gt;   &lt;v:f eqn="prod @7 21600 pixelWidth"&gt;   &lt;v:f eqn="sum @8 21600 0"&gt;   &lt;v:f eqn="prod @7 21600 pixelHeight"&gt;   &lt;v:f eqn="sum @10 21600 0"&gt;  &lt;/v:formulas&gt;  &lt;v:path extrusionok="f" gradientshapeok="t" connecttype="rect"&gt;  &lt;o:lock ext="edit" aspectratio="t"&gt; &lt;/v:shapetype&gt;&lt;v:shape id="Picture_x0020_0" spid="_x0000_i1026" type="#_x0000_t75" alt="example 1.JPG" style="'width:352.5pt;height:336pt;visibility:visible;"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\NAVODE~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.jpg" title="example 1"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/NAVODE%7E1/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image001.jpg" alt="example 1.JPG" shapes="Picture_x0020_0" height="448" width="470" /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;This goes without saying as self explanatory. Give the name you want for the report. But There is one Major thing you want to remember. &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;b style=""&gt;&lt;span style="line-height: 115%;"&gt;&lt;span style="font-size:130%;"&gt;When No Data is present Display the Static Text.&lt;/span&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;Most designers would require the report to display header information (static text such as Report Title, date) when there is no data to display. The report does not have these properties set by default. To do that you need to set the Right Option in the “More” Tab in the report creation window.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_5tb9fheHRJI/SBP9oov1fZI/AAAAAAAAABI/wzQ_Ndhx5Ts/s1600-h/example2.JPG"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer;" src="http://1.bp.blogspot.com/_5tb9fheHRJI/SBP9oov1fZI/AAAAAAAAABI/wzQ_Ndhx5Ts/s400/example2.JPG" alt="" id="BLOGGER_PHOTO_ID_5193773669862964626" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p class="MsoNormal"&gt;&lt;span style="font-size:100%;"&gt;&lt;!--[if gte vml 1]&gt;&lt;v:shape id="Picture_x0020_1" spid="_x0000_i1025" type="#_x0000_t75" alt="example2.JPG" style="'width:349.5pt;height:336pt;visibility:visible;mso-wrap-style:square'"&gt;  &lt;v:imagedata src="file:///C:\DOCUME~1\NAVODE~1\LOCALS~1\Temp\msohtmlclip1\01\clip_image002.jpg" title="example2"&gt; &lt;/v:shape&gt;&lt;![endif]--&gt;&lt;!--[if !vml]--&gt;&lt;img src="file:///C:/DOCUME%7E1/NAVODE%7E1/LOCALS%7E1/Temp/msohtmlclip1/01/clip_image002.jpg" alt="example2.JPG" shapes="Picture_x0020_1" height="448" width="466" /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;This can be set by a Java code too. But that’s another topic altogether. I find after developing a lot of reports I forget have always forgotten to set this option. And had to go back and set it.&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-4545189982499353042?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/4545189982499353042/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/basics.html#comment-form' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/4545189982499353042'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/4545189982499353042'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/basics.html' title='Creating a New Report Using iReport'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_5tb9fheHRJI/SBP9vYv1faI/AAAAAAAAABQ/cslusx2jgPU/s72-c/example+1.JPG' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-5119685558182351250</id><published>2008-04-26T00:46:00.000-07:00</published><updated>2008-04-26T00:56:22.923-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='iReport Rules'/><category scheme='http://www.blogger.com/atom/ns#' term='iReport Guidelines'/><title type='text'>The iReport Golden Rules</title><content type='html'>&lt;p style="font-weight: bold;" class="MsoNormal"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="font-weight: bold;" class="MsoNormal"&gt;When In doubt go to &lt;a href="http://www.jasperforge.org/index.php?option=com_joomlaboard&amp;amp;Itemid=215"&gt;JasperForge Forum.&lt;/a&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Google and blogs like these are a lot of help, But there the community is larger and more likely that you’ll get a response from some of the Admins if your problem is really complicated.&lt;/p&gt;  &lt;p style="font-weight: bold;" class="MsoNormal"&gt;See the iReport Examples. &lt;span style=""&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;They are a must have when you are using iReport. Your simple questions can be answered by looking at the examples which would save you a lot of time&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Talk to the community, Help Others.&lt;/span&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.5in;"&gt;Mainly at the JasperForge forum. The same problems are posted over and over because people has slightly different variations of the same problem&lt;/p&gt;  &lt;p class="MsoNormal"&gt;&lt;span style="font-weight: bold;"&gt;Experiment.&lt;/span&gt; &lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 0.25in;"&gt;    There’s a lot of things to learn about iReport. The chances are that you may find some             things very interesting&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-5119685558182351250?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/5119685558182351250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/ireport-golden-rules.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/5119685558182351250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/5119685558182351250'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/ireport-golden-rules.html' title='The iReport Golden Rules'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5198887997194448266.post-8652824451289277898</id><published>2008-04-25T23:59:00.000-07:00</published><updated>2008-04-26T00:05:53.578-07:00</updated><title type='text'>Starting Up</title><content type='html'>After working close to 6 months in developing reports using iReport with minimum or no guidance I decided to share my finding with the rest of the world.&lt;br /&gt;&lt;br /&gt;If you want to download iReport go to &lt;a href="http://sourceforge.net/project/showfiles.php?group_id=64348&amp;package_id=64215&amp;release_id=584978"&gt;SourceForge&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5198887997194448266-8652824451289277898?l=ireport-guide.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ireport-guide.blogspot.com/feeds/8652824451289277898/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/starting-up.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/8652824451289277898'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5198887997194448266/posts/default/8652824451289277898'/><link rel='alternate' type='text/html' href='http://ireport-guide.blogspot.com/2008/04/starting-up.html' title='Starting Up'/><author><name>Acromantula</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='31' src='http://3.bp.blogspot.com/_5tb9fheHRJI/SRb6HYPx4AI/AAAAAAAAAPg/Jcje_r3VFfU/S220/n286700470_217846_7663.jpg'/></author><thr:total>0</thr:total></entry></feed>
