Language Translator

Showing posts with label JASPER REPORTS. Show all posts
Showing posts with label JASPER REPORTS. Show all posts
JASPER REPORTS

I've recently been researching reporting tools for a project I will be soon be working on. One of the tools I've been looking at is JasperReports. JasperReports is a very popular open source (LGPL) reporting library written in Java. Unfortunately it is not very well documented and I had a hard time coming up with a simple report. After some research, I was able to generate a simple report, this article summarizes what needs to be done to get started with JasperReports. See Resources for information on how to find additional information and documentation about JasperReports.

Getting Started

JasperReports' reports are defined in XML files, which by convention have an extension of jrxml. A typical jrxml file contains the following elements:

  • - the root element.
  • </span></code> - its contents are printed only once at the beginning of the report </li><li class="MsoNormal"><code><span style="font-size: 10pt;"><pageheader></span></code> - its contents are printed at the beginning of every page in the report. </li><li class="MsoNormal"><code><span style="font-size: 10pt;"><detail></span></code> - contains the body of the report. </li><li class="MsoNormal"><code><span style="font-size: 10pt;"><pagefooter></span></code> - its contents are printed at the bottom of every page in the report. </li><li class="MsoNormal"><code><span style="font-size: 10pt;"><band></span></code> - defines a report section, all of the above elements contain a <code><span style="font-size: 10pt;">band</span></code> element as its only child element. </li></ul><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;">All of the elements are optional, except for the root <code><span style="font-size: 10pt;">jasperReport</span></code> element. Here is an example jrxml file that will generate a simple report displaying the string "Hello World!"</p><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;" class="MsoNormal"><code><span style="font-size: 10pt;"><?xml version="1.0"?></span></code><span style="font-size: 10pt;"> <br /><code><!DOCTYPE jasperReport</code> <br /><code> PUBLIC "-//JasperReports//DTD Report Design//EN"</code> <br /><code> "http://jasperreports.sourceforge.net/dtds/jasperreport.dtd"></code> <br /> <br /><code><jasperreport name="Simple_Report"></code> <br /><code> <detail></code> <br /><code> <band height="20"></code> <br /><code> <statictext></code> <br /><code> <reportelement x="180" y="0" width="200" height="20"></code> <br /><code> <text><![CDATA[Hello World!]]></text></code> <br /><code> </statictext></code> <br /><code> </band></code> <br /><code> </detail></code> <br /><code></jasperreport></code></span></p><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;">For this simple example, I omitted the optional <code><span style="font-size: 10pt;"><title></span></code>, <code><span style="font-size: 10pt;"><pageheader></span></code> and <code><span style="font-size: 10pt;"><pagefooter></span></code> elements. The <code><span style="font-size: 10pt;"><statictext></span></code> element, unsurprisingly, displays static text on the report, as can be seen, it contains a single <code><span style="font-size: 10pt;"><text></span></code> element defining the text that will be displayed.</p><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;">jrxml files need to be "compiled" into a binary format that is specific to JasperReports, this can be achieved by calling the <code><span style="font-size: 10pt;">compileReport()</span></code> method on the <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JasperCompileManager</span></code> class. There are several overloaded versions of this method, in our example, we will use the one that takes a single <code><span style="font-size: 10pt;">String</span></code> parameter, consult the JasperReport documentation for details on the other versions of the method.</p><div style="text-align: justify;"> <pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>public class JasperReportsIntro<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>public static void main(String[] args)<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>JasperReport jasperReport;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>JasperPrint jasperPrint;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>try<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span><b>jasperReport = JasperCompileManager.compileReport(</b></code><b> <br /> <br /><code><span style=""> </span>"reports/jasperreports_demo.jrxml");</code> <br /> <br /><code><span style=""> </span>jasperPrint = JasperFillManager.fillReport(</code> <br /> <br /><code><span style=""> </span>jasperReport, new HashMap(), new JREmptyDataSource());</code> <br /> <br /><code><span style=""> </span>JasperExportManager.exportReportToPdfFile(</code> <br /> <br /><code><span style=""> </span>jasperPrint, "reports/simple_report.pdf");</code></b><code><o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>}<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>catch (JRException e)<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>e.printStackTrace();<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>}<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>}<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>}<o:p></o:p></code></pre> </div><p style="font-family: lucida grande; text-align: justify;"><script type="text/javascript"> <!-- google_ad_client = "pub-1227676363202711"; google_ad_width = 336; google_ad_height = 280; google_ad_format = "336x280_as"; google_ad_type = "text"; google_ad_channel =""; google_color_border = "FAFAFF"; google_color_bg = "FAFAFF"; google_color_link = "0000FF"; google_color_url = "666666"; google_color_text = "000000"; //--> </script><script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"> </script>A jrxml file needs to be compiled only once, but for this simple example it is compiled every time the application is executed. Before a report can be generated, it needs to be "filled" with data, this is achieved by calling the <code><span style="font-size: 10pt;">fillReport()</span></code> method on the <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JasperFillManager</span></code> class. Again, there are several overloaded versions of the <code><span style="font-size: 10pt;">fillReport()</span></code> method, here we will use one that takes three parameters, an instance of <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JasperReport</span></code>, a <code><span style="font-size: 10pt;">java.util.HashMap</span></code> containing any parameters passed to the report, and an instance of a class implementing the <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JRDataSource</span></code> interface. The line that accomplishes this in our example above is</p><div style="text-align: justify;"> <pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>jasperPrint = JasperFillManager.fillReport(<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>jasperReport, new HashMap(), new JREmptyDataSource());<o:p></o:p></code></pre> </div><p style="font-family: lucida grande; text-align: justify;" class="MsoNormal">Since our simple report takes no parameters, we pass an empty <code><span style="font-size: 10pt;">HashMap</span></code> as the second parameter, and an instance of <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JREmptyDataSource</span></code> as the third parameter. <code><span style="font-size: 10pt;">JREmptyDataSource</span></code> is a convenience class included with JasperReports, it is basically a DataSource with no data. </p><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;">Finally, in our example, we export the report to a PDF file, this way it can be read by Adobe Acrobat, XPDF, Evince, or any other PDF reader, the line that accomplishes this in our example is</p><div style="text-align: justify;"> <pre style="font-family: lucida grande;"><code>JasperExportManager.exportReportToPdfFile(</code> <br /> <br /><code><span style=""> </span>jasperPrint, "reports/simple_report.pdf");</code></pre> </div><p style="font-family: lucida grande; text-align: justify;" class="MsoNormal">The parameters are self-explanatory. </p><div style="text-align: justify;"> </div><h2 style="font-family: lucida grande; text-align: justify;">Conclusion</h2><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;">This article provides a brief howto on how to display PDF reports generated with JasperReports from a web application to the user's browser. Basic knowledge of JasperReports and Java Servlet programming is assumed. See the Resources section for links to JasperReports and Servlet programming tutorials and documentation.</p><div style="text-align: justify;"> </div><p style="font-family: lucida grande; text-align: justify;">The trick to sending a PDF report generated by JasperReports to the user's browser is to call the <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JasperRunManager.runReportToPdf()</span></code> method. That method has several overloaded versions, the one we will use here has three parameters, a <code><span style="font-size: 10pt;">String</span></code> representing the absolute path of the compiled report (jasper file), an instance of a class implementing the <code><span style="font-size: 10pt;">java.util.Map</span></code> interface, and an instance of a class implementing the <code><span style="font-size: 10pt;">net.sf.jasperreports.engine.JRDataSource</span></code> interface. The <code><span style="font-size: 10pt;">JasperRunManager.runReportToPdf()</span></code> method returns an array of bytes that can be passed as a parameter to the <code><span style="font-size: 10pt;">write()</span></code> method of the <code><span style="font-size: 10pt;">javax.servlet.ServletOutputStream</span></code> class. An instance of <code><span style="font-size: 10pt;">ServletOutputStream</span></code> can be obtained from the <code><span style="font-size: 10pt;">getOutputStream()</span></code> method of the <code><span style="font-size: 10pt;">javax.servlet.http.HttpServletResponse</span></code> class. The best way to explain and visualize all of this is by example, the following code segment demonstrates this technique:</p><div style="text-align: justify;"> <pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>package tutorial.jasperreportsbrowserdemo;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>import java.io.File;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import java.io.IOException;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import java.io.PrintWriter;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import java.io.StringWriter;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import java.util.HashMap;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>import javax.servlet.ServletException;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import javax.servlet.ServletOutputStream;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import javax.servlet.http.HttpServlet;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import javax.servlet.http.HttpServletRequest;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import javax.servlet.http.HttpServletResponse;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>import net.sf.jasperreports.engine.JREmptyDataSource;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import net.sf.jasperreports.engine.JRException;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>import net.sf.jasperreports.engine.JasperRunManager;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code>public class JasperReportsBrowserDemoServlet extends HttpServlet<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>protected void doGet(HttpServletRequest request, HttpServletResponse response)<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>throws ServletException, IOException<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>ServletOutputStream servletOutputStream = response.getOutputStream();<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>File reportFile = new File(getServletConfig().getServletContext()<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>.getRealPath("/reports/Simple_Report.jasper"));<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>byte[] bytes = null;<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>try<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>bytes = JasperRunManager.runReportToPdf(reportFile.getPath(),<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>new HashMap(), new JREmptyDataSource());<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>response.setContentType("application/pdf");<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>response.setContentLength(bytes.length);<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><o:p> </o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>servletOutputStream.write(bytes, 0, bytes.length);<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>servletOutputStream.flush();<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>servletOutputStream.close();<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>}<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>catch (JRException e)<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>{<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>// display stack trace in the browser<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>StringWriter stringWriter = new StringWriter();<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>PrintWriter printWriter = new PrintWriter(stringWriter);<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>e.printStackTrace(printWriter);<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>response.setContentType("text/plain");<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>response.getOutputStream().print(stringWriter.toString());<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>}<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code><span style=""> </span>}<o:p></o:p></code></pre><pre style="font-family: lucida grande;"><code>}<o:p></o:p></code></pre> <br /></div> <div style='clear: both;'></div> </div> <div class='post-footer'> <div class='post-footer-line post-footer-line-1'> <span class='post-author vcard'> Posted by <span class='fn' itemprop='author' itemscope='itemscope' itemtype='http://schema.org/Person'> <span itemprop='name'>Ravinderjeet S. Nagpal</span> </span> </span> <span class='post-timestamp'> </span> <span class='post-comment-link'> <a class='comment-link' href='http://coders-and-programmers-struts.blogspot.com/2009/05/jasper-reports-ive-recently-been.html#comment-form' onclick=''> No comments: </a> </span> <span class='post-icons'> <span class='item-action'> <a href='https://www.blogger.com/email-post.g?blogID=5746133272740170278&postID=4700431220049469654' title='Email Post'> <img alt='' class='icon-action' height='13' src='https://resources.blogblog.com/img/icon18_email.gif' width='18'/> </a> </span> <span class='item-control blog-admin pid-1684947021'> <a href='https://www.blogger.com/post-edit.g?blogID=5746133272740170278&postID=4700431220049469654&from=pencil' title='Edit Post'> <img alt='' class='icon-action' height='18' src='https://resources.blogblog.com/img/icon18_edit_allbkg.gif' width='18'/> </a> </span> </span> <div class='post-share-buttons goog-inline-block'> <a class='goog-inline-block share-button sb-email' href='https://www.blogger.com/share-post.g?blogID=5746133272740170278&postID=4700431220049469654&target=email' target='_blank' title='Email This'><span class='share-button-link-text'>Email This</span></a><a class='goog-inline-block share-button sb-blog' href='https://www.blogger.com/share-post.g?blogID=5746133272740170278&postID=4700431220049469654&target=blog' onclick='window.open(this.href, "_blank", "height=270,width=475"); return false;' target='_blank' title='BlogThis!'><span class='share-button-link-text'>BlogThis!</span></a><a class='goog-inline-block share-button sb-twitter' href='https://www.blogger.com/share-post.g?blogID=5746133272740170278&postID=4700431220049469654&target=twitter' target='_blank' title='Share to Twitter'><span class='share-button-link-text'>Share to Twitter</span></a><a class='goog-inline-block share-button sb-facebook' href='https://www.blogger.com/share-post.g?blogID=5746133272740170278&postID=4700431220049469654&target=facebook' onclick='window.open(this.href, "_blank", "height=430,width=640"); return false;' target='_blank' title='Share to Facebook'><span class='share-button-link-text'>Share to Facebook</span></a><a class='goog-inline-block share-button sb-pinterest' href='https://www.blogger.com/share-post.g?blogID=5746133272740170278&postID=4700431220049469654&target=pinterest' target='_blank' title='Share to Pinterest'><span class='share-button-link-text'>Share to Pinterest</span></a> </div> </div> <div class='post-footer-line post-footer-line-2'> <span class='post-labels'> Labels: <a href='http://coders-and-programmers-struts.blogspot.com/search/label/JASPER%20REPORTS' rel='tag'>JASPER REPORTS</a> </span> </div> <div class='post-footer-line post-footer-line-3'> <span class='post-location'> </span> </div> </div> </div> </div> </div></div> </div> <div class='blog-pager' id='blog-pager'> <span id='blog-pager-older-link'> <a class='blog-pager-older-link' href='http://coders-and-programmers-struts.blogspot.com/search/label/JASPER%20REPORTS?updated-max=2009-05-08T00:59:00%2B05:30&max-results=20&start=20&by-date=false' id='Blog1_blog-pager-older-link' title='Older Posts'>Older Posts</a> </span> <a class='home-link' href='http://coders-and-programmers-struts.blogspot.com/'>Home</a> </div> <div class='clear'></div> <div class='blog-feeds'> <div class='feed-links'> Subscribe to: <a class='feed-link' href='http://coders-and-programmers-struts.blogspot.com/feeds/posts/default' target='_blank' type='application/atom+xml'>Posts (Atom)</a> </div> </div> </div><div class='widget HTML' data-version='1' id='HTML1'> <div class='widget-content'> <script async src="http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <!-- Display1 --> <ins class="adsbygoogle" style="display:inline-block;width:728px;height:90px" data-ad-client="ca-pub-6480466511192076" data-ad-slot="3778319158"></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> </div> <div class='clear'></div> </div><div class='widget HTML' data-version='1' id='HTML6'> <div class='widget-content'> <!-- Histats.com START --> <div style="align:right;"> <a align="right" href="http://www.histats.com" target="_blank" title="Trucking company tracking" ><script type="text/javascript" language="javascript"> var s_sid = 1044248;var st_dominio = 4; var cimg = 429;var cwi =112;var che =75; </script></a> <script type="text/javascript" language="javascript" src="http://s10.histats.com/js9.js"></script> <noscript><a href="http://www.histats.com" target="_blank"> <img align="right" src="http://s4.histats.com/stats/0.gif?1044248&1" alt="Trucking company tracking" border="0" /></a> </noscript> </div> <!-- Histats.com END --> </div> <div class='clear'></div> </div></div> </div> </div> <div class='column-left-outer'> <div class='column-left-inner'> <aside> </aside> </div> </div> <div class='column-right-outer'> <div class='column-right-inner'> <aside> <div class='sidebar section' id='sidebar-right-1'><div class='widget Profile' data-version='1' id='Profile1'> <h2>About Me</h2> <div class='widget-content'> <a href='https://www.blogger.com/profile/10414769957987342743'><img alt='My photo' class='profile-img' height='32' src='//blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEghpZjGlhpRqjh86EBuzZ9mBnPt4qGVQJQxUr5rkjEPffHimk9h1cU_HF-ap1WeAvNGgTi9XpmAGDDbWiw4Y47uQQZR2yESlt9xdWG6OllcaGR4Gjdz3xS6snKFNRxfR6g/s32/unnamed.jpg' width='32'/></a> <dl class='profile-datablock'> <dt class='profile-data'> <a class='profile-name-link g-profile' href='https://www.blogger.com/profile/10414769957987342743' rel='author' style='background-image: url(//www.blogger.com/img/logo-16.png);'> Ravinderjeet S. Nagpal </a> </dt> <dd class='profile-textblock'>Hello folks, <br> I have around 13 plus years of experience in IT industry, worked on various domains for different MNCs. <br> This blog came into existence back in 2009 due to my sheer interest in exploring, learning technology. <br> Anyways, Thanks for visiting this blog, and I hope your experience was fruitful, if not, please stay tuned. I will keep working to make this blog more useful. <br> Cheers! <br> Ravinderjeet</dd> </dl> <a class='profile-link' href='https://www.blogger.com/profile/10414769957987342743' rel='author'>View my complete profile</a> <div class='clear'></div> </div> </div><div class='widget Label' data-version='1' id='Label1'> <h2>Labels</h2> <div class='widget-content cloud-label-widget-content'> <span class='label-size label-size-3'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/CODES'>CODES</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/control'>control</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/coupled'>coupled</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Dependency'>Dependency</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Dependency%20Injection'>Dependency Injection</a> </span> <span class='label-size label-size-5'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Download'>Download</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Error'>Error</a> </span> <span class='label-size label-size-3'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/FAQs'>FAQs</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/flexibility'>flexibility</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Injection'>Injection</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/inversion'>inversion</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/IOC'>IOC</a> </span> <span class='label-size label-size-1'> <span dir='ltr'>JASPER REPORTS</span> </span> <span class='label-size label-size-4'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Java%20Code'>Java Code</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/JAVA%20MAIL'>JAVA MAIL</a> </span> <span class='label-size label-size-2'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/JavaScript'>JavaScript</a> </span> <span class='label-size label-size-3'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/JSP%2FServlet%20Code'>JSP/Servlet Code</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Loosely'>Loosely</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/of'>of</a> </span> <span class='label-size label-size-3'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Qusetions%20AND%20Answers'>Qusetions AND Answers</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/RESTful%20example'>RESTful example</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Restful%20WebService'>Restful WebService</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/RESTful%20WebService%20Example'>RESTful WebService Example</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/reusability'>reusability</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/scalability'>scalability</a> </span> <span class='label-size label-size-2'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Spring'>Spring</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Spring%20Boot'>Spring Boot</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Spring%20Boot%20JSP%20Rendering%20Error'>Spring Boot JSP Rendering Error</a> </span> <span class='label-size label-size-4'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Struts%20Books%20Download'>Struts Books Download</a> </span> <span class='label-size label-size-4'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Struts%20Code'>Struts Code</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Struts%20Programs'>Struts Programs</a> </span> <span class='label-size label-size-3'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/SWING'>SWING</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/WebService'>WebService</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/WebService%20Code'>WebService Code</a> </span> <span class='label-size label-size-1'> <a dir='ltr' href='http://coders-and-programmers-struts.blogspot.com/search/label/Webservices'>Webservices</a> </span> <div class='clear'></div> </div> </div><div class='widget PopularPosts' data-version='1' id='PopularPosts1'> <h2>Popular Posts</h2> <div class='widget-content popular-posts'> <ul> <li> <div class='item-thumbnail-only'> <div class='item-title'><a href='http://coders-and-programmers-struts.blogspot.com/2009/01/download-bookstore-project-in.html'>Download BookStore Project in JSP/Servlet with its Database, Download JSP/Servlet Project for BookStore</a></div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-thumbnail-only'> <div class='item-title'><a href='http://coders-and-programmers-struts.blogspot.com/2009/01/download-sample-jspservlet-project-for.html'>Download Sample JSP/Servlet project for Classifieds</a></div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-thumbnail-only'> <div class='item-title'><a href='http://coders-and-programmers-struts.blogspot.com/2009/01/download-struts-project-code-struts.html'>Download Struts Project Code, Struts Project Code Download, Download struts sample project</a></div> </div> <div style='clear: both;'></div> </li> <li> <div class='item-thumbnail-only'> <div class='item-title'><a href='http://coders-and-programmers-struts.blogspot.com/2009/01/download-pagination-code-in-jspservlet.html'>Download Pagination code in JSP/Servlet</a></div> </div> <div style='clear: both;'></div> </li> </ul> <div class='clear'></div> </div> </div><div class='widget AdSense' data-version='1' id='AdSense3'> <div class='widget-content'> <script type="text/javascript"> google_ad_client = "ca-pub-6480466511192076"; google_ad_host = "ca-host-pub-1556223355139109"; google_ad_host_channel = "L0001"; google_ad_slot = "5313123950"; google_ad_width = 250; google_ad_height = 250; </script> <!-- coders-and-programmers-struts_sidebar-right-1_AdSense3_250x250_as --> <script type="text/javascript" src="//pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <div class='clear'></div> </div> </div></div> <table border='0' cellpadding='0' cellspacing='0' class='section-columns columns-2'> <tbody> <tr> <td class='first columns-cell'> <div class='sidebar section' id='sidebar-right-2-1'><div class='widget AdSense' data-version='1' id='AdSense1'> <div class='widget-content'> <script type="text/javascript"><!-- google_ad_client = "ca-pub-6480466511192076"; google_ad_host = "ca-host-pub-1556223355139109"; google_ad_host_channel = "L0001"; /* coders-and-programmers-struts_sidebar-right-1_AdSense1_250x250_as */ google_ad_slot = "2221507552"; google_ad_width = 250; google_ad_height = 250; //--> </script> <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"> </script> <div class='clear'></div> </div> </div></div> </td> <td class='columns-cell'> <div class='sidebar no-items section' id='sidebar-right-2-2'></div> </td> </tr> </tbody> </table> <div class='sidebar section' id='sidebar-right-3'><div class='widget Stats' data-version='1' id='Stats1'> <h2>Total Pageviews</h2> <div class='widget-content'> <div id='Stats1_content' style='display: none;'> <script src='https://www.gstatic.com/charts/loader.js' type='text/javascript'></script> <span id='Stats1_sparklinespan' style='display:inline-block; width:75px; height:30px'></span> <span class='counter-wrapper graph-counter-wrapper' id='Stats1_totalCount'> </span> <div class='clear'></div> </div> </div> </div></div> </aside> </div> </div> </div> <div style='clear: both'></div> <!-- columns --> </div> <!-- main --> </div> </div> <div class='main-cap-bottom cap-bottom'> <div class='cap-left'></div> <div class='cap-right'></div> </div> </div> <footer> <div class='footer-outer'> <div class='footer-cap-top cap-top'> <div class='cap-left'></div> <div class='cap-right'></div> </div> <div class='fauxborder-left footer-fauxborder-left'> <div class='fauxborder-right footer-fauxborder-right'></div> <div class='region-inner footer-inner'> <div class='foot no-items section' id='footer-1'></div> <table border='0' cellpadding='0' cellspacing='0' class='section-columns columns-2'> <tbody> <tr> <td class='first columns-cell'> <div class='foot no-items section' id='footer-2-1'></div> </td> <td class='columns-cell'> <div class='foot no-items section' id='footer-2-2'></div> </td> </tr> </tbody> </table> <!-- outside of the include in order to lock Attribution widget --> <div class='foot section' id='footer-3' name='Footer'><div class='widget Attribution' data-version='1' id='Attribution1'> <div class='widget-content' style='text-align: center;'> Simple theme. Powered by <a href='https://www.blogger.com' target='_blank'>Blogger</a>. </div> <div class='clear'></div> </div></div> </div> </div> <div class='footer-cap-bottom cap-bottom'> <div class='cap-left'></div> <div class='cap-right'></div> </div> </div> </footer> <!-- content --> </div> </div> <div class='content-cap-bottom cap-bottom'> <div class='cap-left'></div> <div class='cap-right'></div> </div> </div> </div> <script type='text/javascript'> window.setTimeout(function() { document.body.className = document.body.className.replace('loading', ''); }, 10); </script> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/517362887-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AOuZoY5CKZcspDX3U6Re4DsN36JRT7ZB5w:1713597508981';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d5746133272740170278','//coders-and-programmers-struts.blogspot.com/search/label/JASPER%20REPORTS','5746133272740170278'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '5746133272740170278', 'title': 'Java Programmers and Coders', 'url': 'http://coders-and-programmers-struts.blogspot.com/search/label/JASPER%20REPORTS', 'canonicalUrl': 'http://coders-and-programmers-struts.blogspot.com/search/label/JASPER%20REPORTS', 'homepageUrl': 'http://coders-and-programmers-struts.blogspot.com/', 'searchUrl': 'http://coders-and-programmers-struts.blogspot.com/search', 'canonicalHomepageUrl': 'http://coders-and-programmers-struts.blogspot.com/', 'blogspotFaviconUrl': 'http://coders-and-programmers-struts.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en', 'localeUnderscoreDelimited': 'en', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Java Programmers and Coders - Atom\x22 href\x3d\x22http://coders-and-programmers-struts.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22Java Programmers and Coders - RSS\x22 href\x3d\x22http://coders-and-programmers-struts.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Java Programmers and Coders - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/5746133272740170278/posts/default\x22 /\x3e\n', 'meTag': '', 'adsenseClientId': 'ca-pub-6480466511192076', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': true, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/d86c8c5eadffdf93', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'Twitter', 'key': 'twitter', 'shareMessage': 'Share to Twitter', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'index', 'searchLabel': 'JASPER REPORTS', 'pageName': 'JASPER REPORTS', 'pageTitle': 'Java Programmers and Coders: JASPER REPORTS', 'metaDescription': 'Java , J2ee , Struts , Struts2 , Struts 2 , Download Struts , Download Spring ,\nDownload Code , Download Project , Java Error JAR WAR'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard!', 'ok': 'Ok', 'postLink': 'Post Link'}}, {'name': 'template', 'data': {'name': 'Simple', 'localizedName': 'Simple', 'isResponsive': false, 'isAlternateRendering': false, 'isCustom': false, 'variant': 'pale', 'variantId': 'pale'}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'Java Programmers and Coders', 'description': 'Java , J2ee , Struts , Struts2 , Struts 2 , Download Struts , Download Spring ,\nDownload Code , Download Project , Java Error JAR WAR', 'url': 'http://coders-and-programmers-struts.blogspot.com/search/label/JASPER%20REPORTS', 'type': 'feed', 'isSingleItem': false, 'isMultipleItems': true, 'isError': false, 'isPage': false, 'isPost': false, 'isHomepage': false, 'isArchive': false, 'isSearch': true, 'isLabelSearch': true, 'search': {'label': 'JASPER REPORTS', 'resultsMessage': 'Showing posts with the label JASPER REPORTS', 'resultsMessageHtml': 'Showing posts with the label \x3cspan class\x3d\x27search-label\x27\x3eJASPER REPORTS\x3c/span\x3e'}}}]); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense4', 'crosscol', document.getElementById('AdSense4'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_TranslateView', new _WidgetInfo('Translate1', 'main', document.getElementById('Translate1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense2', 'main', document.getElementById('AdSense2'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'main', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'navMessage': 'Showing posts with label \x3cb\x3eJASPER REPORTS\x3c/b\x3e. \x3ca href\x3d\x22http://coders-and-programmers-struts.blogspot.com/\x22\x3eShow all posts\x3c/a\x3e', 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/3538472454-lbx.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/13464135-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'main', document.getElementById('HTML1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML6', 'main', document.getElementById('HTML6'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar-right-1', document.getElementById('Profile1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_LabelView', new _WidgetInfo('Label1', 'sidebar-right-1', document.getElementById('Label1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_PopularPostsView', new _WidgetInfo('PopularPosts1', 'sidebar-right-1', document.getElementById('PopularPosts1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense3', 'sidebar-right-1', document.getElementById('AdSense3'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AdSenseView', new _WidgetInfo('AdSense1', 'sidebar-right-2-1', document.getElementById('AdSense1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_StatsView', new _WidgetInfo('Stats1', 'sidebar-right-3', document.getElementById('Stats1'), {'title': 'Total Pageviews', 'showGraphicalCounter': true, 'showAnimatedCounter': true, 'showSparkline': true, 'statsUrl': '//coders-and-programmers-struts.blogspot.com/b/stats?style\x3dBLACK_TRANSPARENT\x26timeRange\x3dALL_TIME\x26token\x3dAPq4FmCYBVQUgsvckZWEY_B1nUB55k9Gti_E3p8J5NpcFGmglYHZlmm3-3jaV_KEmQlgf8IwqIdJVouhl-RiLokTvr2lFMTIgQ'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1', 'footer-3', document.getElementById('Attribution1'), {}, 'displayModeFull')); </script> </body> </html>