Create Jasper Reports in JSF Portlet...

Hi,
Is there anyone having samples of creating Jasper Reports in JSF Portlet ( Sun Java Creator 2 EA).
Thanks indeed for your help.
=netsearcher2000=

Hi Sundar
check link:http://www.jasperassistant.com/demo.html
this link contains all necessary steps for creating jasper report this would be helpful for u

Similar Messages

  • Call to Jasper Report from a jsf only? Or can v use a jsff page?.

    Hi,
    I am new to JDev and ADF. I have a application using ADF . I have created Jasper reports as well and trying to  Integrate the Reports .
    If i make a call to the Jasper Report with a small dummy application it works.
    But if i do the same from within the application it doesn work.
    Should we make a call to the Jasper Report from a jsf only? Or can v use a jsff page?.
    Waiting for answers. thanks in advance

    Should we make a call to the Jasper Report from a jsf only? Or can v use a jsff page?.
    This usually doesn't matter.
    You will probably need to post some code so we can see how you generate and display report.
    Dario

  • Integrate jsf, jboss and jasper reports

    Hi there!
    I've a problem with integration jboss with jasper reports and jsf. Which jasper classes do I have to place on a server and what jboss files do I need to configure? How can I run jasper report from the jsf page? Any information on this subject will be very usefull.
    Thanx for help in advance.
    Adam

    Unless I have totally misunderstood your question, I think you have posted this question in the wrong forum. This forum is dedicated to developer questions about JSR 208 (Java Business Integration), a specification from the JCP that describes a service-oriented integration architecture. In this realm, integration means getting separate applications and messaging systems to interoperate, when they were never designed to do so. Your question sounds like you want to install particular technologies into jboss; this is a very different use of the term "integration".

  • Example in jasper report

    Hi
    pls give me the soln...
    how to create jasper report in java. and how the jrxml convert to jasper ..and where we need to comopile these files....
    how to use these in tomcat...pls give me a suggestion...

    Although this is not a relevant post . Let me tell you.
    You will need an IREPORT tool to make templates for the Jasperrepot. Then you will have to create a servlet in Java which will read this template XML and popultae the data with either request variables or through query.
    You will easliy get that sample servlet on IBM developers network.
    But you will need to learn IREPORT for creating templates for Reports.

  • I need Jasper Report example

    Hi,
    I need example on how to generate Reports by using Jasper. So if any one having any link pls just send me.
    Thank you in advance

    For Creating Jasper Report u need to import these packages
    import net.sf.jasperreports.engine.JRException;
    import net.sf.jasperreports.engine.JasperCompileManager;
    import net.sf.jasperreports.engine.JasperFillManager;
    import net.sf.jasperreports.engine.JasperPrint;
    import net.sf.jasperreports.engine.JasperPrintManager;
    public boolean compileReport()
    try {
    JasperCompileManager.compileReportToFile("path of fileName.jrxml");
    catch (Exception e) {
    System.out.println("compile exception " + fileName + ", " + e);
    return false;
    return true;
    public JasperPrint fillReport()
    try {
    JasperPrint jasperPrint = JasperFillManager.fillReport("fileName.jasper", <parameters if u use any in Jasper Report Design else give null>, new JRFieldLevelAuditSource(data));
    return jasperPrint;
    } catch (JRException e) {
    return null;
    public void print(JasperPrint jasperPrint) {
    try {
    JasperPrintManager.printReport(jasperPrint, true);
    } catch (JRException e)
    e.printStackTrace();
    }

  • Jasper report Jdeveloper 11g

    Hi
    I want to run a jasper report in Jdeveloper 11g with weblogic internal server 10.3. I am facing the compliling time errors.
    ]] Root cause of ServletException.
    net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:4: package net.sf.jasperreports.engine does not exist
    import net.sf.jasperreports.engine.*;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:5: package net.sf.jasperreports.engine.fill does not exist
    import net.sf.jasperreports.engine.fill.*;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:18: cannot find symbol
    symbol: class JREvaluator
    public class PDFReport_1242746795729_631091 extends JREvaluator
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:25: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_LOCALE = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:26: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_JASPER_REPORT = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:27: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_VIRTUALIZER = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:28: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_TIME_ZONE = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:29: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_FILE_RESOLVER = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:30: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_ReportTitle = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:31: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_SCRIPTLET = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:32: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_PARAMETERS_MAP = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:33: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_CONNECTION = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:34: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_CLASS_LOADER = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:35: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_DATA_SOURCE = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:36: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_URL_HANDLER_FACTORY = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:37: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_IS_IGNORE_PAGINATION = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:38: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_FORMAT_FACTORY = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:39: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_MAX_COUNT = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:40: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_TEMPLATES = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:41: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    private JRFillParameter parameter_REPORT_RESOURCE_BUNDLE = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:42: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    private JRFillField field_Publisher = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:43: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    private JRFillField field_CatalogId = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:44: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    private JRFillField field_Journal = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:45: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    private JRFillField field_Edition = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:46: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    private JRFillField field_Author = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:47: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    private JRFillField field_Title = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:48: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    private JRFillVariable variable_PAGE_NUMBER = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:49: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    private JRFillVariable variable_COLUMN_NUMBER = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:50: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    private JRFillVariable variable_REPORT_COUNT = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:51: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    private JRFillVariable variable_PAGE_COUNT = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:52: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    private JRFillVariable variable_COLUMN_COUNT = null;
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:75: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_LOCALE = (JRFillParameter)pm.get("REPORT_LOCALE");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:76: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_JASPER_REPORT = (JRFillParameter)pm.get("JASPER_REPORT");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:77: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_VIRTUALIZER = (JRFillParameter)pm.get("REPORT_VIRTUALIZER");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:78: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_TIME_ZONE = (JRFillParameter)pm.get("REPORT_TIME_ZONE");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:79: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_FILE_RESOLVER = (JRFillParameter)pm.get("REPORT_FILE_RESOLVER");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:80: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_ReportTitle = (JRFillParameter)pm.get("ReportTitle");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:81: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_SCRIPTLET = (JRFillParameter)pm.get("REPORT_SCRIPTLET");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:82: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_PARAMETERS_MAP = (JRFillParameter)pm.get("REPORT_PARAMETERS_MAP");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:83: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_CONNECTION = (JRFillParameter)pm.get("REPORT_CONNECTION");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:84: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_CLASS_LOADER = (JRFillParameter)pm.get("REPORT_CLASS_LOADER");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:85: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_DATA_SOURCE = (JRFillParameter)pm.get("REPORT_DATA_SOURCE");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:86: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_URL_HANDLER_FACTORY = (JRFillParameter)pm.get("REPORT_URL_HANDLER_FACTORY");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:87: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_IS_IGNORE_PAGINATION = (JRFillParameter)pm.get("IS_IGNORE_PAGINATION");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:88: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_FORMAT_FACTORY = (JRFillParameter)pm.get("REPORT_FORMAT_FACTORY");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:89: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_MAX_COUNT = (JRFillParameter)pm.get("REPORT_MAX_COUNT");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:90: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_TEMPLATES = (JRFillParameter)pm.get("REPORT_TEMPLATES");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:91: cannot find symbol
    symbol : class JRFillParameter
    location: class PDFReport_1242746795729_631091
    parameter_REPORT_RESOURCE_BUNDLE = (JRFillParameter)pm.get("REPORT_RESOURCE_BUNDLE");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:100: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    field_Publisher = (JRFillField)fm.get("Publisher");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:101: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    field_CatalogId = (JRFillField)fm.get("CatalogId");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:102: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    field_Journal = (JRFillField)fm.get("Journal");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:103: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    field_Edition = (JRFillField)fm.get("Edition");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:104: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    field_Author = (JRFillField)fm.get("Author");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:105: cannot find symbol
    symbol : class JRFillField
    location: class PDFReport_1242746795729_631091
    field_Title = (JRFillField)fm.get("Title");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:114: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    variable_PAGE_NUMBER = (JRFillVariable)vm.get("PAGE_NUMBER");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:115: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    variable_COLUMN_NUMBER = (JRFillVariable)vm.get("COLUMN_NUMBER");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:116: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    variable_REPORT_COUNT = (JRFillVariable)vm.get("REPORT_COUNT");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:117: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    variable_PAGE_COUNT = (JRFillVariable)vm.get("PAGE_COUNT");
    ^
    C:\oracle\Middleware\jdeveloper\system\system11.1.1.0.31.52.05\DefaultDomain\PDFReport_1242746795729_631091.java:118: cannot find symbol
    symbol : class JRFillVariable
    location: class PDFReport_1242746795729_631091
    variable_COLUMN_COUNT = (JRFillVariable)vm.get("COLUMN_COUNT");
    ^
    59 errors
         at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:195)
         at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:219)
         at jsp_servlet.__catalog._jspService(__catalog.java:90)
         at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
         at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
         Truncated. see log file for complete stacktrace
    >
    could I know the libraries to be added to run the jasper report on the jdeveloper 11g

    Any body can tell me how to create jasper report in oracle jdevloper 11 g .

  • Jasper Reports problem

    Hi,
    I have just begun to use Jasper Reports, and I am trying to load a sample JR xml file into a jsp in my web application.
    report.jsp
    <%@ page
       import="java.io.*,
               java.util.*,
               java.sql.Connection,
               javax.sql.DataSource,
               javax.naming.InitialContext,
               net.sf.jasperreports.engine.*,
               net.sf.jasperreports.engine.design.JasperDesign,
               net.sf.jasperreports.engine.xml.JRXmlLoader,
               net.sf.jasperreports.engine.export.*"
    %><%@page import="com.energyts.ebench.*"
    %><%@page import="com.energyts.db.*"
    %><%@page import="java.sql.ResultSet"
    %>
    <%
         out.println("Attempting to create Jasper report");
         try{
         // read in xml design
         InputStream input = new FileInputStream(new File("c:\\Tomcat 5.5\\webapps\\eBench\\report.xml"));
         JasperDesign design = JRXmlLoader.load(input);
         // compile design
         JasperReport report = JasperCompileManager.compileReport(design);
         // Database connection
         Statement statement = EbenchUtils.getStatement(session);
         JasperPrint print
        = JasperFillManager.fillReport(report, new HashMap(), statement.getConnection());
           JasperExportManager.exportReportToPdfFile(
                     print, "reports/simple_report.pdf");
         }catch (JRException e){
              out.println("failed");
              e.printStackTrace();
    %>I am using Tomcat 5.5 and JasperReports 2.04
    I am getting this error:
    HTTP Status 404 - reports\report.xml (The system cannot find the path specified)
    type Status report
    message reports\report.xml (The system cannot find the path specified)
    description The requested resource (.\reports\report.xml (The system cannot find the path specified)) is not available.
    Is the way I declare my path not declared correctly (the file is in the directory)? do the Tomcat settings need to be changed for this to work?
    Any suggestions
    Thanks
    J

    I learned that my mistake was that I am not using the .jasper file. I have a new error now although I already put the needed file inside the classes folder. This is the error:
    java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.fill.JRVerticalFiller
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:601)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:582)
         at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:368)
         at EmptyDSReportServlet.doGet(EmptyDSReportServlet.java:25)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:126)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:103)
         at com.caucho.server.http.FilterChainServlet.doFilter(FilterChainServlet.java:96)
         at com.caucho.server.http.Invocation.service(Invocation.java:315)
         at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
         at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:253)
         at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:170)
         at com.caucho.server.TcpConnection.run(TcpConnection.java:139)
         at java.lang.Thread.run(Thread.java:619)

  • Help in Jasper Reports embedd with jsp

    Hello,
    I am developing one small web application with the help of JSP and servlet. I want to use jasper reports in this. I am getting problem in creating jasper report. I have .jrxml format report. I want to embedd it in my jsp class. I am getting values from database by help of servlet. And then sending control in jsp page.I don't have any idea. I have download jasper ireport designer and cerated one report. Please tell me how to embedd it in jsp page.
    Thanks in advance
    Manveer

    Hi Manveer
    From your servlet class you can create the Jasper report and send the url of the file to the JSP.
    In your JSP you just give the link to that file.
    Regards
    Dilip.

  • JSF with Jasper Reports

    Hi,
    I am a new bie to JSF and also Jasper Reports.
    I Have created a JSF page where by passing fromDate and toDate from UI passed as a parameter to Jasperreport to generate a report.
    Report is generated as a pdf but my requirement is i want to view the pdf in the browser.
    I used with runReportToPdf(), but with this i dont no how to get the servletConfig whereby in some code i got the code to get the servletConfig and servletContext and passing the .jasper file to convert it as a inputStream or a File.
    I think this is not the proper way to view the things in browser bcoz i want to show the Excel and CSV report also in the browser.
    Could anyone Pls help me in this. Is there any other way to do this.
    My Code:
    <code>
    public void execute()
         try
              FacesContext context = FacesContext.getCurrentInstance();
              Object ObjTest = context.getExternalContext().getSessionMap().get("awardCodeMast");
              AwardCodeMast aObj = (AwardCodeMast)ObjTest;
                        DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
                        Date fromDate1 = aObj.getEffectiveFromDate();
                        String s1 = df.format(fromDate1);
                        System.out.println("#####################"+s1);
              Date toDate1 = aObj.getEffectiveToDate();
              String s2 = df.format(toDate1);
              System.out.println("#####################"+s2);
                        // Started with Jasper Reports
              JasperReport jasperReport;
              JasperPrint jasperPrint;
              JRResultSetDataSource obj;
              JasperDesign jasperDesign;
              JRDataSource jr1;
              String fromDate = s1;
              String toDate = s2;
              Class.forName("com.mysql.jdbc.Driver");
              Connection con1=DriverManager.getConnection("jdbc:mysql://HARUNS-ATHITHI.ITCINFOTECH.COM/pba","root","root");
              Statement stmt1=con1.createStatement();
              Map<String, Serializable> parameters = new HashMap<String, Serializable>();
              parameters.put("fromDate", fromDate);
              parameters.put("toDate", toDate);
              System.out.println("Put...........");
              String ss = context.getExternalContext().getRequestServletPath();
              System.out.println("SS : "+ss+"...............");
              byte[] bytes = null;
              ServletOutputStream outstream = null;
              InputStream reportStream = context.getExternalContext().getResourceAsStream("D:/Acegi Security Framework/Sample_WS1/PBA/WebContent/reports/pdffrmt/AwardCode_report_1.jasper");
              HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
              outstream = response.getOutputStream();     
              ExternalContext extContext = context.getExternalContext();
              ServletContext servletContext = (ServletContext) extContext.getContext();
              File reportFile = new File("D:/Acegi Security Framework/Sample_WS1/PBA/WebContent/reports/pdffrmt/AwardCode_report_1.jasper");
              jasperDesign = JasperManager.loadXmlDesign("D:/Acegi Security Framework/Sample_WS1/PBA/WebContent/reports/pdffrmt/AwardCode_report_1.jrxml");
         System.out.println("1..................");
         jasperReport = JasperCompileManager.compileReport(jasperDesign);
         System.out.println("2...................");     
         JasperRunManager.runReportToPdfStream(reportStream, outstream, parameters, con1);
         jasperPrint = JasperFillManager.fillReport(jasperReport, parameters, con1);
         System.out.println("3...............");
         String ss1 = (String)context.getExternalContext().getRequestPathInfo();
         System.out.println(ss1+"............................");
         System.out.println("Report generated....................");
         response.setContentType("application/pdf");
         response.setContentLength(bytes.length);
         System.out.println("Setting content type..................");
         System.out.println("getting output Stream...........");
         response.setContentLength(bytes.length);
         System.out.println("setting the context length...........");
         JasperRunManager.runReportToPdfStream(reportStream, outstream,parameters, con1);
         //outstream.write(bytes);
         System.out.println("writing byte array.............");
         outstream.flush();
         System.out.println("flushing out..............");
         outstream.close();
         ret_sta = "Success";
         }catch(Exception e){System.out.println(e);}
         System.out.println(ret_sta+".....................");
         FacesContext context = FacesContext.getCurrentInstance();
    context.responseComplete();
    </code>
    Kindly help me, i would be very thankful to u.
    Thanks,
    Ambika.

    Hi,
    I want to display a pdf through a web browser. I got it to work with my one report but my other one do not want to work.
    Here is my code.
    public void executeShiftReport(Calendar dateOfReport) {
    try {
    Calendar calMrng = new GregorianCalendar(dateOfReport.get(Calendar.YEAR), dateOfReport.get(Calendar.MONTH), dateOfReport.get(Calendar.DAY_OF_MONTH), 06, 00);
    Date reportDate = dateOfReport.getTime();
    Date dateMrng = calMrng.getTime();
    JasperPrint jasperPrint;
    Connection conn = establishConnection();
    //the paramaters of the report will be saved within the hashmap
    HashMap jasParam = new HashMap();
    jasParam.put("fromDateMorning", new Timestamp(dateMrng.getTime()));
    jasParam.put("Date", reportDate);
    // adds 1 day to the calender to get tomorrows date for night shift ending
    calMrng.add(Calendar.DAY_OF_MONTH, 1);
    Date dateMoreMrng = calMrng.getTime();
    jasParam.put("toDateMorning", new Timestamp(dateMoreMrng.getTime()));
    File file = new File("E:/Projects/BranSystems Internal/BranSupportLog/reports/");
    jasperPrint = JasperFillManager.fillReport(new FileInputStream(new File(file, "morningShift.jasper")), jasParam, conn);
    // JasperExportManager.exportReportToPdf(jasperPrint);
    // JasperExportManager.exportReportToHtmlFile(jasperPrint, "E:/Projects/BranSystems Internal/BranSupportLog/reports/morningShift.html");
    byte[] bytes = JasperExportManager.exportReportToPdf(jasperPrint);
    FacesContext context = FacesContext.getCurrentInstance();
    HttpServletResponse response = (HttpServletResponse) context.getExternalContext().getResponse();
    // let the pdf display in the same window with 'inline',
    response.setHeader("Content-disposition", "inline;filename=morningShift.pdf;");
    response.setContentType("application/pdf");
    response.setContentLength(bytes.length);
    response.getOutputStream().write(bytes);
    response.flushBuffer();
    context.responseComplete();
    } catch (JRException ex) {
    Logger.getLogger(SupportMBean.class.getName()).log(Level.SEVERE, null, ex);
    } catch (FileNotFoundException ex) {
    Logger.getLogger(SupportMBean.class.getName()).log(Level.SEVERE, null, ex);
    } catch (IOException ex) {
    Logger.getLogger(SupportMBean.class.getName()).log(Level.SEVERE, null, ex);
    }

  • JSF - Actuate Reports/Jasper Reports

    Hello,
    I am creating a reporting application using jsf .The report server to be used are Actuate and Jasper.
    I am generating my criteria page(jsf page where user will input criteria for report) dynamically from an xml file.
    The actuate reports are static reports residing on an actuate server. All i need to do is collect the criteria and link the jsp page to the actuate report residing on actuate server.
    I am able to connect to the report using context.redirect(context.encodeActionURL(url)) from my backing bean.
    But the problem is the report opens up in browser but on a different page. i want to embed the report in the jsf page below the criteria displayed.
    How can i achieve this??
    Similar problem i am facing with Jasper reports, i am able to open the jasper report in browser as a pdf, but not able to embed it into my criteria.jsp.
    For jasper reports, i understood that i need to get the repot bytes into a string buffer and use an outputtext to display that.
    I did try that approach, but somehow it doesnt display the proper report, all it displays is <html> tags.
    Any help is appreciated.
    Thanks in advance
    Ashvini

    ra_boy, don't hijack threads.
    Of course you did not read this:
    [http://forums.sun.com/ann.jspa?annID=54]
    or this:
    [http://wikis.sun.com/display/SunForums/Tips]
    Locking.

  • Who is creating general forum topics _? i wanna jasper reports topic ...

    who is creating general forum topics like
    Developers Home > Developer Forums > Java Forums > Enterprise & Distributed Computing > Web Applications > JavaServer Pages (JSP) and JSTL >
    i have troubles with jasper reports . but i solved lots of them . this site is great , but i can not find jasper reports topics easily . i help where i find a jasper reports problem as i can help . but when i need help about it , i am creating topics like here . and normally , here are not much answers for me , because the general topics is " jsp and jstl " .
    i hope i could tell my problem with topics ; i hope someone helps me about it ...

    who is creating general forum topics like
    Developers Home > Developer Forums > Java Forums > Enterprise & Distributed Computing > Web Applications > JavaServer Pages (JSP) and JSTL >
    i have troubles with jasper reports . but i solved lots of them . this site is great , but i can not find jasper reports topics easily . i help where i find a jasper reports problem as i can help . but when i need help about it , i am creating topics like here . and normally , here are not much answers for me , because the general topics is " jsp and jstl " .
    i hope i could tell my problem with topics ; i hope someone helps me about it ...

  • How to create JSF Portlet in Currrent JDeveloper Version

    Hello,
    Now there is no options to plugin Portlet in Current Jdeveloper Version.Anyone have any idea when Oracle Is going to Release the Portlets extension in Production Version???
    Is there any good documents for how to Create JSF Portlet in Oracle JDeveloper current new Version. IF So Please send me the link.
    Thanks
    Sona

    The OracleAS Portal is also required to deploy JSF Portlets. To Develop and deploy a JSF Portlet:
    1. Install the OracleAS application server.
    2. Install the portlet container.
    3. Install the OracleAS Portal Extension.
    4. Generate Portlet with Portal Extension in JDeveloper
    5. Connect to application server.
    6. Deploy Portlet to Application Server.
    7. Install OracleAS Portal
    8. Register Portlet with OracleAS Portal.
    9. View Portlet in OracleAS Portal.
    10. Add Portlet to a page.

  • Why don't responseHeader's works in JSF Portlet

    Hi All,
    I have a JSF portlet where i want to save the contents of my Text area on the click of a button to a word document.(IBM Websphere portal) <h:inputTextarea id="text1" value="#{pc_TextAreaView.textAreaValue}" rows="10" cols="50" /> <h:commandButton id="save" value="Save As Word" action="#{pc_TextAreaView.SaveAsWord}"/> In my page bean i have written the follwoing code but the response.setHeader() doesn't seem to work.I am not getting any pop dialog and i cannot save my file.Please let me know what is wrong in this code snippet.How can i make it work in my portlet.
    public String SaveAsWord() {
      FacesContext context = FacesContext.getCurrentInstance();
      HttpServletResponse response = (HttpServletResponse)context.getExternalContext().getResponse();
      response.setContentType("application/vnd.ms-word");
         response.setHeader("Content-Disposition", "attachment; filename=myfile.doc");
         response.setHeader("Cache-Control", "no-cache");
         try{
         byte[] buf=new byte[4*1024];
         InputStream inStream=new ByteArrayInputStream(textAreaValue.getBytes());
         OutputStream outStream=response.getOutputStream();
         int sizeRead;
         while ( ( sizeRead=inStream.read(buf, 0, buf.length) ) != -1 )
           outStream.write(buf, 0, sizeRead);
         inStream.close();
         outStream.close();
         catch(IOException ex){
          ex.printStackTrace();
         return null;
      }Best Regards,
    Pallavi

    Hi ,
    I am working with jsf 1.2 and jasper 3.0.
    For this problem just try with "aFacesContext.responseComplete();" method. This will work!
    Here is my code for generating pdf file report.
    demoreport.jsp code:
    <h:commandLink immediate="true" actionListener="#{reportGenerator.generateReport}">
                                  <h:outputText value="Generate Report"/>
                             </h:commandLink>Here is bean method: (ReportGenerator.java)
    Note: Services is the user defined class for getting connection obj.
    public void generateReport(ActionEvent actionEvent)
                                       throws ClassNotFoundException, SQLException, IOException,JRException
              Connection connection;
              FacesContext aFacesContext = FacesContext.getCurrentInstance();
              HttpServletResponse response = (HttpServletResponse)aFacesContext.getExternalContext().getResponse();
              ServletContext context = (ServletContext)aFacesContext.getExternalContext().getContext();
              String reportFileName = context.getRealPath("/reports/DemoReport.jasper");
              System.out.println("reportFileName: "+ reportFileName);
              InputStream reportStream = aFacesContext.getExternalContext().getResourceAsStream("/reports/DemoReport.jasper");
              ServletOutputStream servletOutputStream = response.getOutputStream();
              //Class.forName("com.mysql.jdbc.Driver");
              connection = Services.getConnection(); //get the db connection.
              try{
              JasperRunManager.runReportToPdfStream(reportStream,servletOutputStream, new HashMap(),connection);
              catch(JRException lJRException){
                   System.out.println("while run report");
                   lJRException.printStackTrace();
              //connection.close();
              response.setContentType("application/pdf");
              response.setHeader("Content-disposition","attachment; filename=DemoReport.pdf");
              servletOutputStream.flush();
              servletOutputStream.close();
              aFacesContext.responseComplete();
         }Regards,
    Nils

  • How to create printable report from a swing app.

    Hi,
    I have googled quite a bit and have searched the forum extensively but haven't found answers to my questions.
    I have a small swing based application (that uses jtextfields, jbuttons, jlist, etc) that collects information from user
    and stores in some variables; which are like strings, integers, hashmap, etc.
    Now this information is to be formatted and is to be printed as a report.
    Formatted as in, some part of the collected text is to be printed in certain font and other in different color and so on.
    Also the report is to be printed on a paper leaving some space at left and at the top. That means margins need to be set.
    And before all info is to be sent to printer I need to display this information in some report viewer (preview).
    How can I format certain text and set margins? (Is there some Document kind of api which allows me to set margins, change font of certain text?)
    How should I display this text / information as a print preview? (Should I use jeditorpane / jtextpane ?)
    How should I send all the information to the printer? (What java api should be used for printing?)
    The data entered by the user is not saved / persisted to any database. It's to be sent to the printer after submit button is pressed on the swing app.
    Since there is no database I couldn't use jasper-reports.
    Following are links to all threads (not useful) I found when I searched for swing / print / report in the forum :
    http://forums.sun.com/thread.jspa?forumID=331&threadID=225351
    http://forums.sun.com/thread.jspa?forumID=57&threadID=576758
    http://forums.sun.com/thread.jspa?forumID=57&threadID=570629
    http://forums.sun.com/thread.jspa?forumID=1&threadID=489905
    http://forums.sun.com/thread.jspa?forumID=57&threadID=571093
    http://forums.sun.com/thread.jspa?forumID=257&threadID=138450
    http://forums.sun.com/thread.jspa?forumID=57&threadID=583150
    http://forums.sun.com/thread.jspa?forumID=57&threadID=5399572
    http://forums.sun.com/thread.jspa?forumID=57&threadID=579619
    http://forums.sun.com/thread.jspa?forumID=57&threadID=593199
    Help would be much appreciated.

    alan_mehio wrote:
    The simplest thing to do in your case is to load the file content into the JTextArea
    then to create the header and the footer if there is any from java.text.MessageFormat
    then you invoke the print method on the JTextArea instance object> Just let me know if you are face any furrher problem
    Alan Mehio,
    I have been able to set margins and get the printout just the way I want it (after some experiments / trial & error).
    But the problem is, parameters to paper.setImageableArea() are hard coded as in the example code below :
            System.out.println("print?");
            PrinterJob printJob = PrinterJob.getPrinterJob();
            if (printJob.printDialog()) {
                PageFormat pf = printJob.defaultPage();
                Paper paper = pf.getPaper();
                paper.setSize(8.5 * 72, 11 * 72);
                System.out.println("paper width : " + paper.getWidth());// expecting 612
                System.out.println("paper height : " + paper.getHeight());// expecting 792
                System.out.println("ImageableHeight : " + paper.getImageableHeight());
                System.out.println("imageable width : " + paper.getImageableWidth());
                System.out.println("ImageableX : " + paper.getImageableX());
                System.out.println("Imageable y : " + paper.getImageableY());
                //paper.setImageableArea(108, 144, paper.getWidth() - 108, paper.getHeight() - 144);
                paper.setImageableArea(222, 244, paper.getWidth() - 222, paper.getHeight() - 244);
                pf.setPaper(paper);
                printJob.setPrintable(jTextArea1.getPrintable(null, null), pf);
                try {
                    printJob.print();
                } catch (Exception ex) {
                    System.out.println("exception while printing...");
                    ex.printStackTrace();
            }In my case the left margin should be 1.5 inches (38.1mm) and top margin should be 2 inches (50.8 mm)
    Considering 72dpi printer for a A4 size page (8.5in X 11in), the parameters to paper.setImageableArea() should be
    (108, 144, paper.getWidth() - 108, paper.getHeight() - 144);
    But the printout leaves only 1inch for top and left margins.
    Here are o/p lines for method-call with above said params :
    paper width : 612.0
    paper height : 792.0
    ImageableHeight : 648.0
    imageable width : 468.0
    ImageableX : 72.0
    Imageable y : 72.0
    When I pass the following values I get text printed with desired margins on the paper but the above printlns remain exactly the same!
    paper.setImageableArea(222.4, 244, paper.getWidth() - 222.4, paper.getHeight() - 244);
    Although I have been able to achieve what I wanted to without using 3rd party libraries,
    I feel this hard coding of values isn't a good idea and leaves a doubt whether this will work on other systems with different printers.
    My question is, how to get these numbers correct every time? Is there a formula for obtaining these numbers?
    Also formatting of certain part of to-print text is something that is yet to be figured out.
    Thanks.

  • How to generate jasper report in pdf format using swing

    hi all,
    im new to swing and jasper.. can anybody provide me some example on how to generate the jasper report in pdf format? i will call the reportManager from sessionBean.. below is my code:
    1)delegate:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    GenerateReportDto generateReportDto = getAuditTrailServiceRemote().generateIntoPdfReport(fileName, outputFileName, parameters);
    return generateReportDto;
    2)sessionBean:
    public GenerateReportDto generateIntoPdfReport(String fileName, String outputFileName, Map parameters){
    //Map parameters = new HashMap();
    ReportManager reportManager = new ReportManager();
    3)ReportManager()
    public void generateIntoPdfReport(String fileName, String outputFileName, Map parameters) {
              Connection conn = null;
              try {
                   conn = dataSource.getConnection();
                   //Generate the report to bytes
                   File reportFile = new File(fileName);               
                   byte[] bytes =
                        JasperRunManager.runReportToPdf(
                             reportFile.getPath(),
                             parameters,
                             conn
              //conn.close();
              //Write the bytes to a file
              ByteBuffer buf = ByteBuffer.wrap(bytes);
              File file = new File(outputFileName);
              // (if the file exists)
              boolean append = false;
              // Create a writable file channel
              FileChannel wChannel = new FileOutputStream(file, append).getChannel();
              // Write the ByteBuffer contents; the bytes between the ByteBuffer's
              // position and the limit is written to the file
              wChannel.write(buf);
              // Close the file
              wChannel.close();
              } finally {
                   if (conn != null) {
    conn.close();
    Any help would be highly appreciated. Thanks in advance

    Hi ,
    One 'simple' way is by using the DBMS_SCHEDULER db package and the procedure CREATE_JOB(....) using as job_type the value 'EXECUTABLE'...
    Read for further info in 'PL/SQL Packages and Types Reference'.
    If you have access to OEM ... you can configure this there using wizard.....
    Other way is to use the External Procedure call capabiblity of Oracle DB Server...:
    http://www.oracle.com/pls/db102/ranked?word=external+procedure+call&remark=federated_search
    My greetings,
    Sim

Maybe you are looking for

  • Excel 2007 .xlsm Application compatable with Windows 8.1

    I have finely lost the plot, for weeks I have been trying to load an Excel macro .xlsm file created on a Windows 7, with Office 2007 Professional on to a brand new computer running Windows 8.1 with Office 2007 Enterprise. on opening the file in Excel

  • Payment Process Profile Duplicate Issue

    I'm having an issue when creating templates and adding payment attributes. Two attributes of the same thing come up. I'm guessing this is a bug that we are missing the patch for but am not completely sure on this. I haven't been able to find any prev

  • Itunes freeze up when i push done on ' setup your ipod'

    Im new the the world of ipod, this is my fisrt one. i purchased the 32gig ipod touch and love it! i downloaded itunes and hook my touch up and enter the name and select my sync options, i click done, and itunes stops responding all together. i restar

  • 0x8345000E in HyperV 2008 R2 Datacenter

    Hi, We have three  HyperV 2008 R2 datacenter server and they are in Cluster. recently some VM instants are going down frequently with I/O device error. These server is pinging but not accessible either remote or direct connect. I am getting I/O offli

  • CC crashes everytime I try to open it?

    So this happens when I open CC. Yes I unistalled and installed like.. 3 times now. but it keeps doing it and I can't download any adobe product Please help!