Jasper Report closing application also what to do

Hello friends,
i can able to open the jasper report in jasper viewer
from my application(developed in Swings).
But when i am closing the jasper report itz also closing my application window .
Please give your valuable advise
thanking you in advance
regards
shashi

I think yor preview window is using "EXIT_ON_CLOSE".
I have te same exact problem and I remember I saw the solution on a forum when i was starting with jasper. However i dont remember where. When i find it i'll reply again

Similar Messages

  • Regarding Jasper Report

    hi Friends
    Iam able to call jasper report from java code by clicking button.
    Report gets visible on top of Application.
    but when i close report my Application also get close i dont want this to happen
    can any one help me?

    pleeease help me

  • Jasper report integration in Oracle BPM

    Hello friends
    We'r working on an application using Oracle BPM 11g (11.1.1.5.0)
    What we are looking for is to have the ability to generate reports using iReport (jasper).
    Using help from the previous thread below ,we have been able to call a report without any input parameters and by calling the servlet directly.
    Re: generating jasper reports in Oracle BPM
    What we're trying to do here is to have some input parameters for our report.
    I'm trying to do this using a java class, but haven't found any sample to show me the way and samples I've found didn't work in Oracle BPM
    Can anyone help me with this?
    Thank you

    Hi
    I have finally solved my problem.
    The problem was that I could not send the input parameter to the servlet.
    Here is my code:
    in my java class:
    public String actionRunReport() throws Exception {
            // Add event code here...
            String emp = null;
            if (getEmployeeID().getValue() != null) {
                emp = getEmployeeID().getValue().toString();
            } else {
                emp = "1";
            FacesContext ctx = FacesContext.getCurrentInstance();
            HttpServletRequest request =
                (HttpServletRequest)ctx.getExternalContext().getRequest();
            HttpServletResponse response =
                (HttpServletResponse)ctx.getExternalContext().getResponse();
            request.setAttribute("empId", emp);
            request.getRequestDispatcher(response.encodeURL("/printrrportservlet")).forward(request,
                                                                                            response);
            response.flushBuffer();
            ctx.responseComplete();
            return null;
        }in my servlet:
    public void doPost(HttpServletRequest request,
                           HttpServletResponse response) throws ServletException,
                                                                IOException {
            response.setContentType(CONTENT_TYPE);
            //OutputStream ouputStream = null;
            try {
                Connection conn = Connect.createConnection();
                String reportSource = "C:\\reports\\templates\\guarantees.jrxml";
                InputStream input = new FileInputStream(new File(reportSource));
                JasperDesign design = JRXmlLoader.load(input);
                JasperReport report = JasperCompileManager.compileReport(design);
                Map<String, Object> params = new HashMap<String, Object>();
                params.put("reportTitle", "Guarantees");
                params.put("author", "Milad");
                params.put("startDate", (new java.util.Date()).toString());
                params.put("empId", request.getAttribute("empId"));
                JasperPrint jasperPrint =
                    JasperFillManager.fillReport(report, params, conn);
                OutputStream ouputStream = response.getOutputStream();
                JRExporter exporter = null;
                response.setContentType("application/pdf");
                exporter = new JRPdfExporter();
                exporter.setParameter(JRExporterParameter.JASPER_PRINT,
                                      jasperPrint);
                exporter.setParameter(JRExporterParameter.OUTPUT_STREAM,
                                      ouputStream);
                exporter.exportReport();
            } catch (Exception ex) {
                ex.printStackTrace();
        }In jspx page::
    <af:commandButton text="Run report" id="cb1"
       action="#{printBean.actionRunReport}"/>in web.xml:
    <servlet-mapping>
        <servlet-name>PrintrRportServlet</servlet-name>
        <url-pattern>/printrrportservlet</url-pattern>
    </servlet-mapping>

  • Compilation error when i add jasper reports packages to my jsp file

    hi all,
    tell mi the solution its very urgent,
    i have created a jasper report(for eg:ss.jrxml) if i wnt to add this report file to my jsp or servlet,i have to import some jasper reports packages and also adding that report file(jrxml file) to myjsp page in try block using jasperreport class.but,if i compiled this file or when i open this jsp file in web browser it shows error like
    net.sf.jasperreports.engine.*(this is my one of report package used in my jsp) does not exist and jasperreport(this is one of class file in jasperreports to connect) cannot find symbol.
    pls,help mi wat to do to support this packages while running in weblogic server.

    To add libraries to your webapp you need to place the appropriate JARs in the */WEB-INF/lib * directory of your web application folder.
    If you're using an IDE follow whatever are the appropriate steps to add libraries/ external JARs to your project.
    People on the forum help others voluntarily, it's not their job.
    Help them help you.
    Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
    (Yes I know it's on JavaRanch but I think it applies everywhere)
    ----------------------------------------------------------------

  • Jasper Reports Application Deployment to Oracle

    Hello everyone,
    I am deploying my project with jasper reports application to oracle. I have placed the jasperreports jar to .../10.1.3/j2ee/home/applib. When I do that I discovered that the commons-logging-1.0.2.jar of jasper is having conflict with oracle used commons-logging.jar. What is the best way to resolve this?
    For the mean time, I edited the server.xml so that only the jasper jar wil be loaded and I can see if my application is working. I does loads and executes but encounters the ff. errors:
    09/01/28 20:56:12 net.sf.jasperreports.engine.JRException: Error loading
    expression class : CashCollectionPrint_1226914856343_228291
    Is it because my application doesn't have a policy grant to load class files? I have checked the jazn.xml files and i don't know how to add policy grant. If that is really what's causing the jasper error, can anyone help me on giving my application a grant to load class files?
    Here are my environment details:
    Jasper reports version 2.0.4
    OS: Linux x86 (32 bit)
    DB: 10g R2
    The server instance is RUP6
    Thank you so much and I hope you can guide me in deploying my application.
    Rgs,
    Ish
    Edited by: user10226882 on Jan 29, 2009 9:36 AM

    This is the oracle reports forum. If you need information about jasper-reports you should post the question in an appropiate forum.

  • How to deploy Jdeveloper application to war file using jasper reports?

    Hello people,
    I´m not sure I this is the right place to ask, but I really need help.
    I´m using Jdeve 10.1.3.2
    My application is working perfectly. However when I deploy to war file in publish it into application server OC4J. I can´t print report.
    the error says that it can´t find jrxml file.
    I´ve tried to deploy report´s files with the applicaiton. I´ve tried just to set the path of the jrxml file. but nothing works.
    How can I deploy my applicattion to use Jasper reports correctly?
    Thanks willian

    Hi,
    I think first you need to wrap it into an EAR file, then you can deploy it.
    As far as I know standalone deployment of WAR is deprecated as of 640.
    similar threads:
    How to deploy .war on NWDI
    Deploying an existing WAR file into the Portal
    Hopefully this tutorial also gives some idea:
    http://help.sap.com/saphelp_nw70ehp1/helpdata/en/70/13353094af154a91cbe982d7dd0118/frameset.htm
    Regards,
    Ervin

  • How can i call a jasper report from a java Application

    Hi,
    i am chiranjit , currently i working in a web based ERP project, in this project as a report building tool we are using JasperReport wih eclipse plugin . in eclipse report's are generating very well but i am unable to call that report from a java application because i have no idea about the How to call a Jasper Report from a Java Application . so please send me the necessary class names, jar files names and programe code as early as possible.
    Chiranjit

    Ahh, kind of a duplicate thread:
    http://forums.java.sun.com/thread.jspa?threadID=631642
    @OP. You could have clarified your original post and the relationship of your question to java. You did not need a new thread.
    � {�                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I downloaded a document dpf, I can not see it and also when I open my iBook is closed immediately. What should I do?

    I downloaded a document dpf, I can not see it and also when I open my iBook is closed immediately. What should I do?

    1. Install the free Adobe Reader app
    2. Open the PDF attachment with Adobe Reader.

  • 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.

  • Problem in using Jasper Reports with JFrames

    Hi,
    I am using Jasper Reports in Swings.
    I could Generate Jasper Reports from JFrames with out any problem,
    but while closing the Report, the JFrame is also getting closed automatically.
    this should not happen for my application.
    So, how could i restrict the JFrame from exiting when Jasper Reports are closed.
    Thanx in advance.
    Reddy

    Create jasperviewer object as JasperViewer jasperViewer = new JasperViewer(jasperPrint, false);

  • Problem in debuging jasper reports and ADF

    Hi
    I am using JDeveloper 11.1.2.2.0. Inside I created Fusion Web Application ADF, and on the index page created Go button. Now I created Servlet with doGet methode and conncected it to Go button. It is working OK.
    Now I want to run simple jasper report from servlet. Jasper report is based on empty dataset. Here is servlet code:
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
    ServletOutputStream servletOutputStream =response.getOutputStream();
    InputStream reportStream = getServletConfig().getServletContext()
    .getResourceAsStream("C:/Users/myDomain/Desktop/Reporting/ReportPDFPrazan.jasper");
    try
    JasperRunManager.runReportToPdfStream(reportStream,servletOutputStream,null, new JREmptyDataSource());
    response.setContentType(CONTENT_TYPE);
    servletOutputStream.flush();
    servletOutputStream.close();
    catch (JRException e)
    // display stack trace in the browser
    StringWriter stringWriter = new StringWriter();
    PrintWriter printWriter = new PrintWriter(stringWriter);
    e.printStackTrace(printWriter);
    response.setContentType("text/plain");
    response.getOutputStream().print(stringWriter.toString());
    When I hit Go button here what I get:
    java.lang.NullPointerException
         at java.io.ObjectInputStream$PeekInputStream.read(ObjectInputStream.java:2265)
         at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2278)
         at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
         at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
         at java.io.ObjectInputStream.(ObjectInputStream.java:279)
         at net.sf.jasperreports.engine.util.ContextClassLoaderObjectInputStream.(ContextClassLoaderObjectInputStream.java:53)
         at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:214)
         at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:632)
         at net.sf.jasperreports.engine.JasperRunManager.runToPdfStream(JasperRunManager.java:428)
         at net.sf.jasperreports.engine.JasperRunManager.runReportToPdfStream(JasperRunManager.java:849)
         at view.com.lanaco.servlets.PrviServlet.doGet(PrviServlet.java:35)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
    and so on(I can put whole stack if necery)
    I also imported this libraries inside ViewControl project:
         Jasperreports-4.7.1.jar
         Commons-beanutils-1.8.0.jar
         Commons-collections-2.1.1.jar
         Commons-digester-2.1.jar
         Commons-logging-1.1.1.jar
         IText-2.1.7.jar
         Groovy-all-1.7.5.jar
         Poi-3.7-20101029.jar
    Can someone help me with debuging. Please
    Edited by: MarcusO on 2012.10.23 05:18

    I found solution. It should be used like this:
    InputStream reportStream = new FileInputStream(new File("C:/Users/myDomain/Desktop/Reporting/ReportPDFPrazan.jasper"));
    So problem was in input stream. It works fine now.

  • 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

  • Struts & Jasper Report

    i wanna use jasperreport in my web application to print a report.i am using struts framework in my app.pls help me.how will i do it that reporting in my web app?
    my sample code is working in only server side. What should i do to work in client side for printing a report?
    ----My Codes--------
    public class denemeaction extends Action {
    private JasperReport jasperReport;
    private JasperPrint jasperPrint;
    private Object out;
    public denemeaction() {
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception{
    denemeform dform=(denemeform)form;
         File reportFile = new File("C:/omer.jasper");
    if (!reportFile.exists())
         throw new JRRuntimeException("File x.jasper not found. The report design must be compiled first.");
         JasperReport jasperReport = (JasperReport)JRLoader.loadObject(reportFile.getPath());
         JasperPrint jasperPrint =JasperFillManager.fillReport(jasperReport, new HashMap(),new JREmptyDataSource());
         JasperPrintManager.printReport(jasperPrint,false);
    return mapping.getInputForward();
    Thanks ..

    Finally i found a way to add image to jasper report. It is pretty simple, just give the exact image location to the image expression. In your web application, the image location may vary so, dynamically set the image location from your model class. Also, make sure that your lib folder contains itext-1.3.1.jar. If your lib folder contains itext-1.3.1.jar and iText-2.1.3.jar u will get like: java.lang.NoSuchMethodError: com.lowagie.text.Image.plainWidth()F
    So remove the iText-2.1.3.jar and keep only itext-1.3.1.jar, try this will work

  • Apex and Jasper Report Integration

    Hi all,
    If someone was interested to try another way for pdf generation from an apex application can try our Report Chunker based on Jasper Report and now avaiable to download on :
    [http://sourceforge.net/projects/reportchunker/]
    The latest release includes an APEX DEMO APPLICATION.
    Any feedback will be welcome.
    Edited by: NeOGeO on 23-set-2008 1.28

    A few points here.
    Documentation:
    You need to state what permissions are required.
    eg create table, create sequence, create trigger, read/write directory.
    You should also mention the authentication method you use.
    Fortunately I could figure that out myself.
    Now bearing in mind I am your typical target audience, I have no knowledge of Jasper reports, and very little knowledge of java and xml. So I'm now stuck as I don't know what to use for the xml layout or how to write my report.
    At least provide an example xml layout, a example report and a link to where the reports cab be obtained.
    If we need to have anything on the system before we start (eg jasper reports) then this should also be stated (including minimum required version)
    Thats it. Unfortunately I can't go any further until I know more.

  • How to open Jasper report in New window (new Browser,new Tab)

    Hi,
    I'm Using oracle jdeveloper 11.1.1.4.0 fusion middleware for Jasper report. i want to open the Jasper report in new window
    In Application On click of CommandMenuItem(ExportToHTML)it opens the New Window,.While opnening this window i want to call a method (This method opens the jasper report in current browser)
    I Tried the afterPhase and beforePhase for this but doesnt work for me.while executing this using beforePhase I'm getting following Exception :
    Pls Help on this.Thanks in Advance......!!
    Java.lang.IllegalStateException: strict servlet API: cannot call getOutputStream() after getWriter()
    at weblogic.servlet.internal.ServletResponseImpl.getOutputStream(ServletResponseImpl.java:280)
    at javax.servlet.ServletResponseWrapper.getOutputStream(ServletResponseWrapper.java:112)
    at ReportsDisplayBean.exportHtmlReport(ReportsDisplayBean.java:272)Is any other way to do this ? :(
    Thanks.

    Hi,
    The view itself is a Web Part called an XSLT List View Web Part (XLV for short). This Web Part is stored on an ASPX page that is by default associated with a list or library on your site.
    I suggest you can check if the view page is valid, also, you can try to create another view, then redirect to the view page to see if there is xslt in the page.
    Here are some detailed articels for your reference:
    Create a custom list view using SharePoint Designer
    Using SharePoint Designer 2010 to Work with Web Parts
    How to: Customize the Rendering of a Field on a List View
    Best Regards
    Zhengyu Guo
    TechNet Community Support

Maybe you are looking for

  • Error While running a J2EE application on J2EE Engine.

    Hi Guys, I have a Ear file which I deployed successfully .Now in some jsp pages its throwing some exception. . I think its related to Sap parser Can any anyone Resolve this? Application error occurs during request processing.   Internal error while p

  • [SOLVED] Weird question: pacman -Syu nothing to do for quite a while

    Hi, Perhaps this an odd question but I feel like for the past 2-3 weeks on two different computers "pacman -Syu" returns "x up to date" for all repos and "nothing to do" as the result. Could nothing really be upgradeable for this long? Can anyone els

  • Change separator for export into .csv

    Hi! I'd like to change the separator to be "|" instead of "," but the drop down list I can find in "options" is greyed out. Why can't I change the separator for export into csv-files? Or is there a dependency I didn't realize? Regards, Walter PS: jus

  • How to Troubleshoot

    After updating to ios 7.1 iphone 5s turning off randomly when its under the 75% battery.How to resolve this issue?

  • How to make fonts larger, darker

    I have poor vision and would like larger and bolder text.