Jasper report using 2 or more subreports

Hi
This muralikrishna.a
I am using IReport tool, In that I have created One report, in that I have created 2 sub reports. but first subreport is displaying and second sub report is not displaying. I am using JavaBean as DataSource.
I deleted first subreport, second one is displaying, only one subreport is displaying , why second sub report is not displaying.
Thanks
Muaralikrishna

Just another cross poster.
[http://www.java-forums.org/new-java/14512-jasper-report.html]
db
edit And, with a different nic
[http://forums.sun.com/thread.jspa?threadID=5361658]
Edited by: Darryl.Burke

Similar Messages

  • How do i display Jasper Report Using Jsp

    Hi,
    Can anyone give me the code snippet of how to display a jasper report using jsp
    Thanx in advance
    --H                                                                                                                                                                                                                                           

    JasperReport jasperReport =
    JasperCompileManager.compileReport(file);
    JasperPrint jasperPrint = JasperFillManager.fillReport(
    jasperReport, null, conn);
    JasperExportManager.exportReportToHtmlFile(
    jasperPrint, tDest);
    JasperViewer.viewReport(jasperPrint);
    //replace file -> .jrxml file source path
    conn -> database connection name
    tDest -> .html file destination

  • How do i display jasper reports using jsp

    Can anyone help me to display jasper reports in jsp pages
    Thanx in advance

    hi
    Thank you for such a great answer.
    I have a problem here,
    When i generate report using this code all other report formats are generated very good, but the html report is not generated properly. i get nullpx in the img src e.g
    <td><img alt="" src="nullpx" style="width: 20px; height: 1px;"/></td>
    Please help me
    and
    Thanks in advance
    snkr
    Following is the html code of the generated report.
    start--------------------------------------
    =======================================================
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <style type="text/css">
    a {text-decoration: none}
    </style>
    </head>
    <body text="#000000" link="#000000" alink="#000000" vlink="#000000">
    <table width="100%" cellpadding="0" cellspacing="0" border="0">
    <tr><td width="50%"> </td><td align="center">
    <a name="JR_PAGE_ANCHOR_0_1"/>
    <table style="width: 620px" cellpadding="0" cellspacing="0" border="0" bgcolor="white">
    <tr>
    <td><img alt="" src="nullpx" style="width: 200px; height: 1px;"/></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 1px;"/></td>
    <td><img alt="" src="nullpx" style="width: 200px; height: 1px;"/></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 1px;"/></td>
    <td><img alt="" src="nullpx" style="width: 135px; height: 1px;"/></td>
    <td><img alt="" src="nullpx" style="width: 45px; height: 1px;"/></td>
    <td><img alt="" src="nullpx" style="width: 20px; height: 1px;"/></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 30px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 60px;"/></td>
    <td colspan="5" valign="middle" style="text-align: center;"><span style="font-family: sansserif; font-size: 20.0px; font-weight: bold;">
                       Report Background Demo
    </span></td>
    <td colspan="2"><img alt="" src="nullpx" style="width: 65px; height: 60px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 13.0px; font-weight: bold;">Parent_ID</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 13.0px; font-weight: bold;">Product_ID:</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 13.0px; font-weight: bold;">Name:</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">0</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Colour Cosmetcis</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Lipsticks</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-321</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Eye Shadow</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-322</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Shankar</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-322</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-322-001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">test</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-322</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-322-002</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Parikchya</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-323</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">test</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-324</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">first</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-324</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">001-324-001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">first</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">0</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">hair Cleaner</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002-001</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Kumar</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002-002</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">Magilla Gorilla</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">002-003</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">astrigent</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 6px;"/></td>
    </tr>
    <tr valign="top">
    <td><img alt="" src="nullpx" style="width: 20px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">0</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">003</span></td>
    <td><img alt="" src="nullpx" style="width: 10px; height: 24px;"/></td>
    <td colspan="3"><span style="font-family: Times; font-size: 15.0px; font-weight: bold;">test1</span></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 96px;"/></td>
    </tr>
    <tr valign="top">
    <td colspan="8"><img alt="" src="nullpx" style="width: 640px; height: 170px;"/></td>
    </tr>
    </table>
    </td><td width="50%"> </td></tr>
    </table>
    </body>
    </html>
    end------------------------------
    ========================================================

  • Open Jasper Report on IE Browser

    Hi,
    I have used the following code techniques to open the Jasper Report on IE Browser.But It is not opened on IE,But opened on seperate form window.
    Frame Work: Struts 1.1
    <%
    // geting jasper print object from Action Class
    JasperPrint print= (JasperPrint)request.getAttribute("jasperprint");
    //view the jasper report using JasperViewer class with viewReport method
    JasperViewer.viewReport(print,false);
    %>
    It is worked properly .But I want to display this report on IE Browser.
    any one know this ,Please help me.

    Hi,
    I have used the following code techniques to open the Jasper Report on IE Browser.But It is not opened on IE,But opened on seperate form window.
    Frame Work: Struts 1.1
    <%
    // geting jasper print object from Action Class
    JasperPrint print= (JasperPrint)request.getAttribute("jasperprint");
    //view the jasper report using JasperViewer class with viewReport method
    JasperViewer.viewReport(print,false);
    %>
    It is worked properly .But I want to display this report on IE Browser.
    any one know this ,Please help me.

  • Jasper Reports in Weblogic

    can anyone please tell me any link where i can find out how to make jasper reports using weblogic.

    i am doing a project on online polling..i want the following types of reports-
    A. Percentage voting done in different areas, regions, the overall voting percentage.
    B. Number of votes that different candidates got based on the areas, regions etc.
    C. The statistics of all the elections done so far based on date or year of election.
    D. Reports containing details of voters, candidates for administrator.
    further i am using jsp,hibernate,ejb,db2....so i want to know how to start with it in weblogic because i am already using it for my project.

  • How to use Jasper Report

    i am Raja. i want know more jasper report. i am using first time ok.
    How to download jasperreport and what files include and i need sample program
    Help

    i am Raja. i want know more jasper report.You might want to find a JasperReports forum then.

  • Master Child Print outs using JASPER REPORTS

    Hi,
    I am doing report using JASPER REPORTS
    The print out sheet is pre printed one.
    That one is Like
    MASTERS DETAILS(Half of the Papper)
    FIRST CHILD(HAVING MORE THAN ONE RECORD -- Half of the Remaining Half Paper)
    SECOND CHILD (MORE THAN 1 RECORD-- 1/4 of Remaining Papper)
    MASTER DETAILS--Last part of the Pre printed papper
    Hw can i print this one using Jasper details?
    Please give me some Guide lines
    Thank You,
    Suresh
    |
    |

    Hi,
    This forum is exclusively for discussions related to Sun Java Studio Creator. From the description you have given it appears to be related to Jasper reports. So please post your query in the appropriate forum.
    Thanks,
    RK.

  • Open Jasper Report in new page using servlet

    Guys,
    Looks very simple but i am having problem making this process work. I am using 11.1.1.4
    This is my use case:
    - From a employee page, user clicks on a menu item to open report for current employee. I need to pass appropriate report parameters to servlet and open report into new page.
    I can successfully call servlet using commandmenuitem and set request parameters and call servlet from backing bean.... but that doesn't open report in a new page.... any way i can do this?
    Another option i tried was that using gomenuitem and setting target=blank but in that case i need to pass the parameter using servlet url which i like to avoid.(in case i need to pass many parameters in future) (also values will be set on page so i need to generate url when then click the menuitem...... so there are some hoops and loops i need to go through) I don't know a way to pass the request parameter using backing bean to servlet... i don't think it is possible.
    Those are the two approaches i tried.
    If you have any better approach...I would appreciate if you can let me know. (i have searched on internet for two days now.... for the solution)
    -R
    Edited by: polo on Dec 13, 2011 7:22 AM

    Hi,
    Hope following will useful
    http://sameh-nassar.blogspot.com/2009/10/using-jasper-reports-with-jdeveloper.html
    http://www.gebs.ro/blog/oracle/jasper-reports-in-adf/

  • 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

  • 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 in using  Jasper Report  in JSC !

    Hi,
    I am new to this forum and Studio creator as well.
    I made a Web Application with creator.Now i need to make reports of the data in my web application.
    I have heard of Jasper Report.
    But I am unable to find out ,from where to start with in Creator for incorporating Jasper Reports.
    I have read some posts in this forum regarding Jasper Reports.But i am having difficulty to start with.My web application is using Oracle 8i as datasource.
    Can anybody help in this regard
    Thanks .

    Thanks for ur reply,
    I have already read that thread.But that is a bit complex for me.
    I am finding it difficult ,from where to start with.
    That is ,where to put the code for calling the report creation procedure.
    where to put the xml file for the design of the report.
    Can somebody tell me ?
    Thanks again.

  • 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

  • Opening new web page using servlet and jasper report. ?

    Hello,
    I am developing one small web application and implementing jasper report in it. I am using jasper report with servlet. Which is generating one pdf file and displaying in same browser. But I want to open this report in new browser. Which is only display that report window. I am trying it. response.setContentType("application/pdf");
                   /response.addHeader("Content-Disposition", "attachment; filename=" // this is basically for downloading pdf file.
                             + request.getParameter("D:/rnext/30-oct-2009/sms/web/jsp/Reports/allstudentsofwholecollege.jasper") + "");
          response.setContentType("application/pdf");
          response.setContentLength(bytes.length);
          servletOutputStream.write(bytes, 0, bytes.length);
          servletOutputStream.flush();
          servletOutputStream.close();In this code it is showing me attachement file of report.
    When I changed the response.addHeader(Content-Disposition", "inline; filename=" // this is basically for downloading pdf file.)
    It is opening in same window. Please help if you can. It is urgent. please help.
    Thanks in advance.
    Manveer

    Use target attribute with link you have placed on you JSP page. [Look Here|http://www.w3schools.com/tags/att_a_target.asp]
    Also remove Content-Disposition header if you want to open file in browser.
    In latest browsers it might be possible you will see new tab opened rather then whole new browser window, This depends on browser settings.

  • Error in running Jasper Reports for more than 100 users in stress test

    I have created a web application with Jasper reports. during the stress test, we were able to run the same report simultaneously for 100 concurrent users, after that we get the following error. I hope there is no problem in my code (correct me if i am wrong)
    We use Web Sphere
    The error we get is as follows:
    java.io.FileNotFoundException: /apps/HewittProjects/installedApps/TBIA/workforce_CUR.ear/workforceServer4.16.4.war/reports/timesheet_mgr2.jasper (Too many open files)
               at java.io.FileInputStream.open(Native Method)
               at java.io.FileInputStream.(FileInputStream.java:106)
               at com.wily.introscope.agent.probe.io.ManagedFileInputStream.(ManagedFileInputStream.java:89)
               at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:85)
               at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:64)
               at com.workforcesoftware.servlets.ReportServlet2.getCompiledReport(ReportServlet2.java:712)
               at com.workforcesoftware.servlets.ReportServlet2.doPost(ReportServlet2.java:423)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
               at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
               at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
               at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
               at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
               at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
               at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
               at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
               at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:61)
               at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1009)
               at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:529)
               at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:208)
               at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
               at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:321)
               at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
               at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
               at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
               at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
               at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
               at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
               at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
               at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
    NESTED BY :
    net.sf.jasperreports.engine.JRException: Error loading object from file : /apps/HewittProjects/installedApps/TBIA/workforce_CUR.ear/workforceServer4.16.4.war/reports/timesheet_mgr2.jasper
               at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:92)
               at net.sf.jasperreports.engine.util.JRLoader.loadObject(JRLoader.java:64)
               at com.workforcesoftware.servlets.ReportServlet2.getCompiledReport(ReportServlet2.java:712)
               at com.workforcesoftware.servlets.ReportServlet2.doPost(ReportServlet2.java:423)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
               at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
               at com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService(StrictServletInstance.java:110)
               at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service(StrictLifecycleServlet.java:174)
               at com.ibm.ws.webcontainer.servlet.ServicingServletState.service(StrictLifecycleServlet.java:333)
               at com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service(StrictLifecycleServlet.java:116)
               at com.ibm.ws.webcontainer.servlet.ServletInstance.service(ServletInstance.java:283)
               at com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch(ValidServletReferenceState.java:42)
               at com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch(ServletInstanceReference.java:40)
               at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:61)
               at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1009)
               at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:529)
               at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:208)
               at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:134)
               at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:321)
               at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
               at com.ibm.ws.webcontainer.cache.invocation.CacheableInvocationContext.invoke(CacheableInvocationContext.java:120)
               at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:250)
               at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
               at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
               at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:652)
               at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:448)
               at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:937)
    if this really cannot find the file, then how could it run successfully for 100 users?
    Have anyone experienced this problem?
    Thanks for your help.

    ummm seems odd to have 100 users making a report.. that can be the limitation of your application..

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

Maybe you are looking for

  • Including down payment made to vendor in the internal order

    Hi all My requirement is like this. We use IM and IO(Capex orders) for procuring and capitalising assets. We are able to assign all the costs of procuring assets (both APC and incidental expenses to the internal order). We use purchase orders and ass

  • Display, Backlight & OS issue

    Hi all, So, I opened my Macbook Pro 13" Late 2011 this morning to find the screen behaving strangely.  There was a blue tint spreading from the left side, like ghosting, but more streaky. Anyway, first thing I tried was to shut down the Mac and start

  • Manual mail triggering issues in SOST

    Hi , In standard notification type (M1) ACTION BOX " Send confirmation of Receipt", i executed the Email with user's mail id. Mail was generated.But its waiting for long time in SOST(send request) and i need to manually trigger it in SOST to send it

  • Set exchange rate field in billing document

    VBRK-CPKUR (set exchange rate tick box). Anyone tell me wht this does? Is it driven from the billing document type? It is defaulted to checked for us and I don't want it to be. How can I change the default? Points will be awarded. Jon

  • Missing apply during import panel in lightroom 4

    Missing apply during import panel in lightroom 4.