Trying to generate a pdf with jasper reports

Fellas,
i hav trying to generate a pdf with jasper reports, but i cant. I create a file .jasper with iReports. This is my code:
emite.java
package utilitarios;
//import net.sf.jasperreports
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.view.JasperViewer;
import java.sql.*;
import java.util.*;
import javax.swing.*;
import java.util.HashMap;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
public class emitebl {
private static Connection getConnection( ) throws ClassNotFoundException, SQLException{
String driver = "org.postgresql.Driver";
String url = "jdbc:postgresql://localhost/sist";
String user = "usuario";
String password = "";
Class.forName(driver);
Connection con = DriverManager.getConnection( url, user, password );
return con;
public void geraRelatorio( ) throws JRException, Exception{
Connection con = getConnection( );
Statement stm = con.createStatement( );
String query = "SELECT * FROM emissaobl WHERE id=4";
ResultSet rs = stm.executeQuery(query);
JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
Map parameters = new HashMap();
JasperFillManager.fillReportToFile("emitebl.jasper",parameters,jrRS);
JasperExportManager.exportReportToPdfFile("emitebl.jrprint");
JasperViewer.viewReport("emissao_bl.pdf",false);
} emissao.jsp:
<%@ page import="utilitarios.*" %>
<%
new emitebl().geraRelatorio();
%>Following the error message exception:
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: emitebl.jasper
     org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
     org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
     org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:76)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
root cause
net.sf.jasperreports.engine.JRException: emitebl.jasper
     net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:73)
     net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:270)
     utilitarios.emitebl.geraRelatorio(emitebl.java:37)
     org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:54)
     org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
     org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
     org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
     javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
     org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)where i hav to put the .jasper file?

Hi,
If you have placed your .jrxml file say in C:\reports, and when you use compileReportToFile(jrxmlFileName), then the jasper file will be created in the same directory C:\report with the same file name with .jasper extension. If you want a pdf report then specify the same location and file name with '.pdf' extension as destination .
Hope this helps

Similar Messages

  • Trying to generate a pdf with jasper

    Fellas,
    i hav trying to generate a pdf with jasper reports, but i cant. I create a file .jasper with iReports. This is my code:
    emite.java
    package utilitarios;
    //import net.sf.jasperreports
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.view.JasperViewer;
    import java.sql.*;
    import java.util.*;
    import javax.swing.*;
    import java.util.HashMap;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class emitebl {
    private static Connection getConnection( ) throws ClassNotFoundException, SQLException{
    String driver = "org.postgresql.Driver";
    String url = "jdbc:postgresql://localhost/sist";
    String user = "usuario";
    String password = "";
    Class.forName(driver);
    Connection con = DriverManager.getConnection( url, user, password );
    return con;
    public void geraRelatorio( ) throws JRException, Exception{
    Connection con = getConnection( );
    Statement stm = con.createStatement( );
    String query = "SELECT * FROM emissaobl WHERE id=4";
    ResultSet rs = stm.executeQuery(query);
    JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
    Map parameters = new HashMap();
    JasperFillManager.fillReportToFile("emitebl.jasper",parameters,jrRS);
    JasperExportManager.exportReportToPdfFile("emitebl.jrprint");
    JasperViewer.viewReport("emissao_bl.pdf",false);
    }emissao.jsp:
    <%@ page import="utilitarios.*" %>
    <%
    new emitebl().geraRelatorio();
    %>Following the error message exception:
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: emitebl.jasper
    org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:846)
    org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
    org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:76)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
    root cause
    net.sf.jasperreports.engine.JRException: emitebl.jasper
    net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:73)
    net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:270)
    utilitarios.emitebl.geraRelatorio(emitebl.java:37)
    org.apache.jsp.emissaobl.exportapdf_jsp._jspService(exportapdf_jsp.java:54)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:99)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:325)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:245)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)where i hav to put the .jasper file?

    import java.io.*;
    import java.net.*;
    import java.sql.*;
    import java.util.*;
    import java.sql.*;
    import java.io.File;
    import java.util.Date;
    import net.sf.jasperreports.engine.*;
    import net.sf.jasperreports.view.JasperViewer;
    class dbAccessi
              public static void main (String args []) throws SQLException
                        try{
                             //DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
                                       Class.forName ("oracle.jdbc.driver.OracleDriver");
                             Connection conn=DriverManager.getConnection("jdbc:oracle:thin:@10.236.8.49:1521:heb","hebuser","hebpass");
         // @machineName:port:SID, userid, password
                                       int i=0,j=0;
                             Statement stmt = conn.createStatement();
                             ResultSet rs = stmt.executeQuery("select age,name from java1");
                                       while (rs.next())
                                  System.out.println (rs.getString(1));
                                  System.out.println (rs.getString(2));
                                  JRResultSetDataSource jrRS = new JRResultSetDataSource(rs);
                                            Map parameters = new HashMap();
                                            JasperFillManager.fillReportToFile("newone.jasper",parameters,jrRS);
                                            JasperExportManager.exportReportToPdfFile("emitebl.jrprint");
                                            JasperViewer.viewReport("emissao_bl.pdf",false);
                                       rs.close();
                                       stmt.close();
                   conn.close();
                             catch(Exception e)
                                  e.printStackTrace();
    for the above given code, I got error message when i run the code as a standalone in cmd prompt and the jasper file specified(may be error occured in .jasper file) could please send the req jasper file to load it.
    Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/commons/lo
    gging/LogFactory
    at net.sf.jasperreports.engine.fill.JRFillDataset.<clinit>(JRFillDataset
    .java:72)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.jav
    a:443)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFi
    ller.java:92)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFi
    ller.java:74)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:
    113)
    at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83
    at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillMa
    nager.java:428)
    at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(Jasper
    FillManager.java:319)
    at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(Jasper
    FillManager.java:275)
    at dbAccessi.main(dbAccessi.java:30)
    thanks in advance

  • Trying to create a pdf with jasper - Content is not allowed in prolog

    hi all,
    Im trying to create a pdf file with jasper reports but i get this error message:
    29/11/2007 16:52:03 org.apache.commons.digester.Digester fatalError
    SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:899)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at org.apache.commons.digester.Digester.parse(Digester.java:1666)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.loadXML(JRPrintXmlLoader.java:151)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.load(JRPrintXmlLoader.java:103)
         at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1376)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:243)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:214)
         at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:140)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:397)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:328)
         at br.com.abril.contratos.Gerar.geraRelatorio(Gerar.java:38)
         at br.com.abril.contratos.Gerar.main(Gerar.java:47)

    cause of the error:
    After some extensive research on the web, it is found that that you are using an UTF-8 encoded file with byte-order mark (BOM). Java doesn't handle BOMs on UTF-8 files properly, making the three header bytes appear as being part of the document. UTF-8 files with BOMs are commonly generated by tools such as Window's Notepad. This is a known bug in Java, but it still needs fixing after almost 8 years...
    There are some hexadecimal character at the begining of the file, which is giving error"content not allowed in prolog". No solution is provided for this till now.
    Example: suppose your file start with <?xml version="1.0" encoding="utf-8"?>. you will see this in a editor. But if you open this file with any hexadecimal editor you will find some junk character in the start of the file.that is causing the problem
    solution:
    1) convert your file into a string and then read the file from the forst character that in my case the first character will be "<".so the junk character will not be there in the string and then again convert it into a file.
    2) some people are able to solve this problem by changing the "utf-8" to "utf-16". remember only in some case. some times this problem also exits in "utf-16" file.
    3) some are able to solve this problem by changing the LANG to US.en.
    4) If the first three bytes of the file have hexadecimal values EF BB BF then the file contains a BOM.so you can also handle by your own.
    5)Download a hexadecimal editor and remove the BOM.
    6) In case you are not able to think furthe then please to more research in internet may be you find some other solution to this problem. But These solution are some type of hack not exactly a solution.

  • Problem displaying PDF with Jasper Reports

    I have the following code that loads a report and displays it in PDF format:
    if(jasperReport==null) {
         logger.debug("Loading...");
         InputStream inStream = null;
         try {
              inStream = getServletContext().getResourceAsStream("/WEB-INF/reports/UnitReport.jasper");
              logger.debug("got inStream");
              jasperReport = (JasperReport) JRLoader.loadObject(inStream);
              logger.debug("Loaded compiled report");
         } catch(Exception e) {
              logger.error(e.getMessage(),e);
         } finally {
              try { inStream.close(); } catch(Exception e) {}
              logger.debug("closed");
    OutputStream outStream = null;
    Connection conn = null;
    try {
         logger.debug("Start build");
         LoginInfo lInfo = (LoginInfo) request.getSession().getAttribute("LoginInfo");
         logger.debug("got name: " + lInfo.getFullName());
         String unitID = (String) request.getParameter("unitID");
         response.setContentType("application/pdf");
         outStream = response.getOutputStream();
         logger.debug("set content type & got OutputStream");
         JRExporter exporter = new JRPdfExporter();
         logger.debug("new exporter");
         conn = DBConnection.getDBConnection();
         logger.debug("got connection");
         //Setup parameters
         Map<String, Object> params = new HashMap<String, Object>();
         params.put("unitID", new Long(unitID));
         params.put("userName", lInfo.getFullName());
         if(debug) {
              logger.debug("set parameters: ");
              logger.debug("  Unit ID:    " + unitID);
              logger.debug("  User Name:  " + lInfo.getFullName());
         JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, params, conn);
         logger.debug("built report");
         exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
         exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, outStream);
         logger.debug("set output parameters");     
         exporter.exportReport();
         logger.debug("dumped.");
    } catch(Exception e) {
         logger.error(e.getMessage(),e);
    } finally {
         try {outStream.close(); } catch(Exception e) {}
         try {conn.close(); } catch(Exception e) {}
         logger.debug("cleanup done.");
    }This works fine locally but when I deploy the EAR file to the production server I get the following:
    [5/19/08 20:55:36:730 CDT] 00000045 SystemOut     O 20:55:36.730 DEBUG JasperReports.doGet:42 - Start
    [5/19/08 20:55:36:730 CDT] 00000045 SystemOut     O 20:55:36.730 DEBUG JasperReports.doGet:49 - reportID: randdunitreport
    [5/19/08 20:55:36:746 CDT] 00000045 SystemOut     O 20:55:36.746 DEBUG JasperReports.doGet:56 - Loading...
    [5/19/08 20:55:36:746 CDT] 00000045 SystemOut     O 20:55:36.746 DEBUG JasperReports.doGet:62 - got inStream
    [5/19/08 20:55:37:168 CDT] 00000045 SystemOut     O 20:55:37.168 DEBUG JasperReports.doGet:64 - Loaded compiled report
    [5/19/08 20:55:37:168 CDT] 00000045 SystemOut     O 20:55:37.168 DEBUG JasperReports.doGet:71 - closed
    [5/19/08 20:55:37:168 CDT] 00000045 SystemOut     O 20:55:37.168 DEBUG JasperReports.doGet:77 - Start build
    [5/19/08 20:55:37:168 CDT] 00000045 SystemOut     O 20:55:37.168 DEBUG JasperReports.doGet:85 - set content type & got OutputStream
    [5/19/08 20:55:37:246 CDT] 00000045 SystemOut     O 20:55:37.246 DEBUG JasperReports.doGet:88 - new exporter
    [5/19/08 20:55:37:246 CDT] 00000045 SystemOut     O 20:55:37.246 DEBUG JasperReports.doGet:91 - got connection
    [5/19/08 20:55:37:246 CDT] 00000045 SystemOut     O 20:55:37.246 DEBUG JasperReports.doGet:98 - set parameters:
    [5/19/08 20:55:37:246 CDT] 00000045 SystemOut     O 20:55:37.246 DEBUG JasperReports.doGet:99 -   Unit ID:    6472
    [5/19/08 20:55:37:246 CDT] 00000045 SystemOut     O 20:55:37.246 DEBUG JasperReports.doGet:100 -   User Name:  Fred Smith
    [5/19/08 20:55:37:996 CDT] 00000045 SystemOut     O 20:55:37.996 ERROR JasperReports.doGet:114 - Error loading object from URL : file:/C:/Program Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/MOMWEBNode01Cell/ClaimProEAR.ear/ClaimPro.
    war/WEB-INF/classes/
    net.sf.jasperreports.engine.JRException: Error loading object from URL : file:/C:/Program Files/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/MOMWEBNode01Cell/ClaimProEAR.ear/ClaimPro.war/WEB-INF/classes/
            at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:145)
            at net.sf.jasperreports.engine.util.JRLoader.loadObjectFromLocation(JRLoader.java:264)
            at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluateSubreport(JRFillSubreport.java:308)
            at net.sf.jasperreports.engine.fill.JRFillSubreport.evaluate(JRFillSubreport.java:257)
            at net.sf.jasperreports.engine.fill.JRFillElementContainer.evaluate(JRFillElementContainer.java:275)
            at net.sf.jasperreports.engine.fill.JRFillBand.evaluate(JRFillBand.java:426)
            at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1380)
            at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:692)
            at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:255)
            at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:113)
            at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:895)
            at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:798)
            at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
            at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
            at com.scag.claimpro.servlet.JasperReports.doGet(JasperReports.java:103)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:989)
            at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:501)
            at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:464)
            at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3252)
            at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:264)
            at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
            at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1433)
            at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:112)
            at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:454)
            at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:383)
            at com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:102)
            at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
            at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
            at com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
            at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
            at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:195)
            at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:743)
            at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:873)
            at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
    Caused by:
    java.io.StreamCorruptedException: invalid stream header
            at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:778)
            at java.io.ObjectInputStream.<init>(ObjectInputStream.java:291)
            at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:140)
            ... 35 more
    [5/19/08 20:55:37:996 CDT] 00000045 SystemOut     O 20:55:37.996 DEBUG JasperReports.doGet:118 - cleanup done.UnitReport contains 2 subreports and works just fine on my local server. Am I missing something here or doing something wrong...any help is greatly appreciated.
    Thanks,
    -Jeff

    How will u convert the document to PDF via XML if the document contains the chart.
    If u have done this please send the code to me on "[email protected]"
    Thanks in advance
    nitish

  • Trying to create a pdf with jasper - Parse Fatal Error at line 1 column 1:

    29/11/2007 16:52:03 org.apache.commons.digester.Digester fatalError
    SEVERE: Parse Fatal Error at line 1 column 1: Content is not allowed in prolog.
    org.xml.sax.SAXParseException: Content is not allowed in prolog.
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
         at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(ErrorHandlerWrapper.java:215)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:386)
         at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:316)
         at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(XMLScanner.java:1438)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDispatcher.dispatch(XMLDocumentScannerImpl.java:899)
         at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
         at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
         at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
         at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
         at org.apache.commons.digester.Digester.parse(Digester.java:1666)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.loadXML(JRPrintXmlLoader.java:151)
         at net.sf.jasperreports.engine.xml.JRPrintXmlLoader.load(JRPrintXmlLoader.java:103)
         at net.sf.jasperreports.view.JRViewer.loadReport(JRViewer.java:1376)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:243)
         at net.sf.jasperreports.view.JRViewer.<init>(JRViewer.java:214)
         at net.sf.jasperreports.view.JasperViewer.<init>(JasperViewer.java:140)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:397)
         at net.sf.jasperreports.view.JasperViewer.viewReport(JasperViewer.java:328)
         at br.com.abril.contratos.Gerar.geraRelatorio(Gerar.java:38)
         at br.com.abril.contratos.Gerar.main(Gerar.java:47)

    The XML file that you're reading has something before the first line - either a comment, whitespace, or other characters. The first characters of your XML file MUST be the XML declaration:
    <?xml ...
    If there's anything before that angle bracket it's not valid XML.

  • 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);
    }

  • Getting error in Portal "Error while generating the PDF" for BI Report

    Hi Experts,
    we are gettign the error while trying to generate the PDF file from the Reports.
    Earlier it was working fine Adobe Reader 8 , currently we have upgrated Adobe Reader 9 in our system.
    After this upggradation browser "*Failed to open PDF in Browser"*
    Could you please suggest me how to diagnostic the error. Do we need to configre something in the Portal or in the Backend BI system for this.
    Please suggest me the needful on this?
    thanks
    Narpal

    Hello,
    i am facing the same problem and found help by 925741:
    "Error while generating PDF"
    There is no more information available when clicking on the error.
    Used Software:
    Adobe 8
    SAP_ABA             700       0018      SAPKA70018     Cross-Application Component
    SAP_BASIS           700       0018      SAPKB70018     SAP Basis Component
    SAP_BW     700       0020     SAPKW70020     SAP NetWeaver BI 7.0
    PI_BASIS       2005_1_70 0018      SAPKIPYJ7I       PI_BASIS 2005_1_700   
    BI_CONT     703     0013     SAPKIBIIQ3     Business Intelligence Content
    Any other ideas?
    Thanks,
    Rainer
    Edited by: Rainer SIGG on Mar 9, 2009 4:41 PM
    Edited by: Rainer SIGG on Mar 9, 2009 5:27 PM
    Edited by: Rainer SIGG on Mar 9, 2009 5:42 PM

  • Edition with jasper report

    I want to edit with jasper report so I have this 2 classes.In the first I have this method
    private Map parameters;
    public void addParametre(String nom, Object valeur)
    if(parameters == null)
    parameters = new HashMap();
    parameters.put(nom, valeur);
    and the second class I have this method
    public String editionAction() {
    ReportGeneratorImmat ge =new ReportGeneratorImmat((String)getForRep().getValue()) ;
    String pWhere="matr='145-A' and";
    String pOrder="order by nom";
    ge.addParametre("P_WHERE",pWhere);
    ge.addParametre("P_ORDER",pOrder);
    return null;
    the problem is that the first parametre (P_WHERE) is successfully added but the the second (P_Order) no. So how can I add both?

    Seems that this question would be better asked on the Jasper Report forums, no?
    John

  • Problems with jasper report pdf exporting

    Hello,
    I coded a simple servlet to view a jasper report (created with iReport) after clicking on the right button in the jsp.
    Here is the problem:
    net.sf.jasperreports.engine.JRRuntimeException: Error evaluating expression :
         Source text : (java.awt.Image)it.businesslogic.ireport.chart.DefaultChartFactory.drawChart(new String[]{"chartName=Pie3D","depthFactor=0.2","titlePosition=1","width=245","plotBackground=[255,255,255]","serie1=SERIE_CONTA_RISPOSTE","serie0=SERIE_RISPOSTA","foregroundAlpha=0.33","tooltips=false","chartBackground=[255,255,255]","subtitle=","title=","legend=true","quality=2","height=168","antialias=true"}, (it.businesslogic.ireport.IReportScriptlet)$P{REPORT_SCRIPTLET})
         net.sf.jasperreports.engine.fill.JRFillSubreport.prepare(JRFillSubreport.java:604)
         net.sf.jasperreports.engine.fill.JRFillElementContainer.prepareElements(JRFillElementContainer.java:343)
         net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:311)
         net.sf.jasperreports.engine.fill.JRFillBand.fill(JRFillBand.java:275)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:1302)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:631)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:228)
         net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:128)
         net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:730)
         net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:632)
         net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:63)
         net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
         net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:203)
         customer_care.servlet.Reporting.getReport(Reporting.java:74)
         customer_care.servlet.Reporting.processRequest(Reporting.java:50)
         customer_care.servlet.Reporting.doGet(Reporting.java:89)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    Here is the code:
    protected void processRequest(HttpServletRequest request, HttpServletResponse response)
        throws ServletException, IOException {
            byte[] byte_array = null;
            try{
                File reportFile = new File(this.getServletConfig().getServletContext().getRealPath("/reports/torte_call_center_agenzie.jasper"));
                if (!reportFile.exists()) throw new JRRuntimeException("File jasper non trovato");
                String nomeFile = reportFile.getPath();
                Map parameters = new HashMap();
                parameters.put("codice_questionario", "2");   //just for testing
                ConnettitiAlDB c = new ConnettitiAlDB();
                Connection conn = c.Connettiti(Conf.db_principale);
                byte_array = JasperRunManager.runReportToPdf(fullpath_filename, parameters, connessione);
                conn.close();
            catch(JRException e){
                e.printStackTrace();
            catch(SQLException e) {
                e.printStackTrace();
            response.setContentType("application/pdf");
         response.setContentLength(byte_array.length);
         ServletOutputStream ouputStream = response.getOutputStream();
         ouputStream.write(byte_array, 0, byte_array.length);
         ouputStream.flush();
         ouputStream.close();
         }Any suggestion? That would be vital to me!
    Thanks in advance

    catching the JRRuntimeException and printing its stacktrace i saw that the jfree chart lib was missing.
    i put it in my libraries but now i got this error:
    java.lang.NoSuchMethodError: com.lowagie.text.pdf.PdfContentByte.transform(Ljava/awt/geom/AffineTransform;)V
         net.sf.jasperreports.engine.export.JRPdfExporter.exportText(JRPdfExporter.java:1468)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportElements(JRPdfExporter.java:484)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportPage(JRPdfExporter.java:448)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportReportToStream(JRPdfExporter.java:413)
         net.sf.jasperreports.engine.export.JRPdfExporter.exportReport(JRPdfExporter.java:250)
         net.sf.jasperreports.engine.JasperExportManager.exportReportToPdf(JasperExportManager.java:188)
         net.sf.jasperreports.engine.JasperRunManager.runReportToPdf(JasperRunManager.java:205)
         customer_care.servlet.Reporting.getReport(Reporting.java:77)
         customer_care.servlet.Reporting.processRequest(Reporting.java:50)
         customer_care.servlet.Reporting.doGet(Reporting.java:92)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    com.lowagie.text.pdf.PdfContentByte.transform is inside the iText library.
    I had an old version so I updated it but nothing changed.
    Any suggestion?
    Thanks

  • Issue when opening pdf using Jasper Report in WLS 9.2

    hi
              I am new to jasper reports and I am using them in Java Page Flow in bea workshop 9.2 Jasper Report 2.0.4
              Created .jasper using iReport
              In one of my action methods
              ServletOutputStream servletOutputStream = getResponse().getOutputStream();
              InputStream reportStream = getServlet().getServletConfig().getServletContext().getResourceAsStream("/classic.jasper");
              JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, new HashMap() ,connection);
              getResponse().setContentType("application/pdf");
              servletOutputStream.flush();
              servletOutputStream.close();
              connection.close();
              When I invoke this action method from another page on click of submit , the pdf file opens fine for the first time wiht all the data in the pdf ( first submit) , and then I closed the pdf and if I click on submit again, it fails to open the pdf with the error message ,
              There was an error opening this document . This file cannot be found.
              However if I keep any pdf / adobe open it is able to open the pdf for mulitple request (submits )
              if I close the pdf it is able to generate the pdf only for the first time and not the second time.
              Please help me resolve the issue, its urgent.
              thanx in advance
              Madhusudan
              HP

    Hi, I am having the same problem as your user when I try to open a pdf form in acrobat. I also have had a similar problem, still unresolved, described here: http://forums.adobe.com/message/5146964.
    I can't find any solutions. I even tried uninstalling Acrobat X pro and instead gong back to installing Acrobat 9. Same problems persist. Don't know what to do.

  • Help required: Cannot open pdf using Jasper Report in Weblogic workshop 9.2

    This message was accepted by the [email protected] mailing list. Hi ,
    I am new to jasper reports and I am using them in Java Page Flow in bea workshop 9.2
    In one of my action methods
    ServletOutputStream servletOutputStream = getResponse().getOutputStream();
    InputStream reportStream = getServlet().getServletConfig().getServletContext().getResourceAsStream("/classic.jasper");
    JasperRunManager.runReportToPdfStream(reportStream, servletOutputStream, new HashMap() ,connection);
    getResponse().setContentType("application/pdf");
    servletOutputStream.flush();
    servletOutputStream.close();
    connection.close();
    When I invoke this action method from another page on click of submit , the pdf file opens fine for the first time( first submit) , and then if I click on submit again, it fails to open the pdf with the error message ,
    There was an error opening this document . This file cannot be found.
    Please help me resolve the issue, its urgent.
    Thanx in advance

    Thanks for the reply David. The problem we're having is that when you are in Workshop, there is the option, under the "File" menu to "Refresh" (F5) You sometimes need to do this to refresh your workspace. I'm sorry, I'm not a developer, so I don't know the details behind what that actually does, other than it "refreshes the workspace" so we can pick up the changes made and checked into subversion.
    Without performing this step, you don't always build from the latest and greatest code.
    The problem we're facing is that it seems that you need to be in Workshop to perform this step. There is a scripted way to do the refresh, but it requires you to open Workshop and run the script. What we're trying to accomplish is a truly scripted solution. All the other steps in the build process can be performed without opening Workshop, but because we can't figure out a way to do this one piece, we cannot have an automated build process.
    - Brian

  • Problem with Jasper Reports

    hi evrybody... i'm having a problem while using Jasper Reports. I'm trying to Export a jrxml file generated by JasperAssistant plug-in in eclipse. but all i'm having is an exception. the following is my code and the said exception:
    CODE:
    public class DataSourceApp
    private static final String TASK_HTML = "html";
    private static final String TASK_XLS = "xls";
    private static final String TASK_CSV = "csv";
    private static final String TASK_RUN = "run";
    public static void main(String[] args)
    String fileName = null;
    String taskName = null;
    taskName = "html";
    fileName = "path\\DataSourceReport.jasper";
    try
    long start = System.currentTimeMillis();
    if (TASK_HTML.equals(taskName))
    JasperPrint jPrint = new JasperPrint();
    HashMap parameters = new HashMap();
    Connection con = null;
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:BOM_DSN","","");
    jPrint = JasperFillManager.fillReport("path\\DataSourceReport.jrxml", parameters, con);
    JasperExportManager.exportReportToHtmlFile(fileName);
    System.err.println("HTML creation time : " + (System.currentTimeMillis() - start));
    System.exit(0);
    catch (JRException e)
    e.printStackTrace();
    System.exit(1);
    catch (Exception e)
    e.printStackTrace();
    System.exit(1);
    EXCEPTION:
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    NESTED BY :
    java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    NESTED BY :
    net.sf.jasperreports.engine.JRException: Error loading object from file : C:\Eclipse\eclipse\workspace\test\BOM_Package\DataSourceReport.jrxml
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:89)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:161)
         at datasource.DataSourceApp.main(DataSourceApp.java:184)
    Caused by: java.io.StreamCorruptedException: invalid stream header
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:737)
         at java.io.ObjectInputStream.<init>(ObjectInputStream.java:253)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:84)
         ... 2 more
    hope you can help me asap.. thanks!
    --joms                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    HI All
    I am working on Jasper report Project and when i am filling the report through
    JasperFillManager.fillreport(String sourceFileName,Map parameters,Connection conn)
    I am getting following exception:(I have included common-collections 3.2.jar in my classpath)
    java.lang.NoClassDefFoundError: org/apache/commons/collections/ReferenceMap
         at net.sf.jasperreports.engine.design.JRAbstractJavaCompiler.<clinit>(JRAbstractJavaCompiler.java:58)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
         at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
         at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
         at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
         at java.lang.Class.newInstance0(Class.java:350)
         at java.lang.Class.newInstance(Class.java:303)
         at net.sf.jasperreports.engine.JasperCompileManager.getCompiler(JasperCompileManager.java:489)
         at net.sf.jasperreports.engine.JasperCompileManager.loadEvaluator(JasperCompileManager.java:243)
         at net.sf.jasperreports.engine.fill.JRFillDataset.createCalculator(JRFillDataset.java:411)
         at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:418)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77)
         at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59)
         at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147)
         at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:57)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:402)
         at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:234)
    Please Suggest ;Thanks in advance

  • Generate arabic pdf in oracle report 10g

    what is the right way to generate arabic language in oracle report 10g destype=PDF??
    i do that for font < arial > and < transparent arabic >
    but i have a problem with some arabic font
    like < simpilified arabic >
    and i put this font in utifont.ali

    You could use the java-library barbecue to generate an image from your number and then include that image in your report.

  • Jnlp with jasper report

    hi ia have one java Frame in which i enter the no.and according to number it ghenereate report from data base.using jasper report
    i have one test.jar and one test.jrxml file for jasper report
    how can i start jasper report with jnlp

    hi ia have one java Frame in which i enter the no.and
    according to number it ghenereate report from data
    base.using jasper reportEither Jasper reports will need to be 'installed',
    or it will need to have its classes on the application's
    runtime classpath. The last one is probably the
    better strategy, but the first is also possible, using
    a (web start) installer (element).
    Can you run this from the command line?
    If so, what exact command do you use to run it?
    i have one test.jar and one test.jrxml file How does the code load the .jrxml file?
    A File("test.jrxml") approach would be a
    problem for web start.
    The best way is to put it also on the application's
    classpath (probably by putting it in a Jar it and
    adding the jar to the classpath), then use getResource()
    to get an URL pointing to it.
    ..for
    jasper report
    how can i start jasper report with jnlpThen there is the question of whether the DB
    and JNLP will be coming from the same server,
    which means the code can be sandboxed, or
    whether it requires code signing and extended
    permissions.
    What does the frame do with the report once it
    is generated? Is it written to disk, or printed?
    This question breaks down to many parts.
    Message was edited by:
    AndrewThompson64

  • Keep getting an access denied window when trying to print to PDF with Adobe Acrobat X with any prgram/internet except for adobe programs

    I am trying to print to PDF from Word, Revit, Firefox and all have given me a Access Denied window popup and would cancel the print.  I have Adobe Acrobat X and Creative Design Suite 6.

    So you are trying to print to the Adobe PDF printer? What is the full statement of the error (typically it indicates a folder or such does not allow access)? If you open Distiller, are there settings files available that you can view?
    In the print menu, select print to file. Then open this file in Distiller. What happens with these two steps and do you get a PDF after the second step?

Maybe you are looking for