A big problem of Generate report with PDF format....Urgent

I want to generate a report with pdf format through one java file, it have two page 1)gen_report.jsp 2) report_gen.java , the compliation was failed. However, i don't what the problem is .... i hope anyone can help me as it is very argent for me ....Thanks a lot
1)gen_report.jsp
<table  id="AutoNumber1">
   <tr>
     <td background="images/top5movie.png">
     <p align="center"> </p>
    </td>
   </tr>
   <tr>
   <td >
      <div align="center">
        <table id="AutoNumber2" >
              <form method="GET" action="../report_gen" name="report_gen" target="_blank" onSubmit="javascript:return checkr1(this)">
                <tr>
                  <td ><b>Report Description:</b></td>
                  <td >This report is to show the top five popular movies in cinemix for a period </td>
                </tr>
                <tr>
                  <td><b>Data scope:</b></td>
                  <td >Start from
                  <input type="text" name="start" value="2003-1-1" >to
                  <input type="text" name="end" value="2006-1-1" ></td>
                 </tr>
                 <tr>
                  <td><b>Data processing:</b></td>
                  <td >Show
                    <select name="order_by">
                      <option value="desc" selected>top</option>
                      <option value="asc">bottom</option>
                    </select>
                  5 films</td>
                </tr>
                <tr>
                  <td> <p align="center">
                      <input type="submit" value="View_Report" name="subm">
                    </p></td>
                </tr>
                <input type="hidden" name="report" value="r1">
              </form>
              <form method="GET" action="../report_gen" name="report_gen" target="_blank" onSubmit="javascript:return checkr2(this)">
                <input type="hidden" name="report" value="r2">
              </form>
            </table>
     </div>
      </td>
    </tr>
  </table>Then my java code is here
report_gen.java
import java.io.*;
import java.net.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.util.*;
import java.sql.*;
// chart and pdf out
import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import org.jfree.chart.ChartFactory;
import org.jfree.chart.JFreeChart;
import org.jfree.chart.plot.PlotOrientation;
import org.jfree.data.category.DefaultCategoryDataset;
import org.jfree.data.xy.*;
import org.jfree.data.xy.XYBarDataset;
import org.jfree.data.general.DefaultPieDataset;
import org.jfree.data.statistics.SimpleHistogramDataset;
import org.jfree.data.xy.XYSeries;
import org.jfree.data.xy.XYSeriesCollection;
import com.lowagie.text.Document;
import com.lowagie.text.DocumentException;
import com.lowagie.text.Rectangle;
import com.lowagie.text.pdf.DefaultFontMapper;
import com.lowagie.text.pdf.PdfContentByte;
import com.lowagie.text.pdf.PdfTemplate;
import com.lowagie.text.pdf.PdfWriter;
import com.lowagie.text.*;
import com.lowagie.text.pdf.*;
import com.lowagie.text.pdf.PdfPCell;
public class report_gen extends HttpServlet
   private final String titles[] = {"Top Five popular movies ",
                    "Financial cirumstance of cinemas",
                    "Distribution of time segment",
                    "Distribution of favourite movie type"
   private final String descs[] = {"This report is to show the top five  popular movies in cinemix for a period ",
               "This report is to show the financial circumstance of each cinema site ",
               "This report is to analysis the customer when is the most visit time ",
               "This report is to analysis the customer which type of movie do they watch the most"
    private final String bigTitle = "Cinemix";
    private final String driver = "org.gjt.mm.mysql.Driver";
    private final String url= "jdbc:mysql://localhost:3306/cinemix";
    private final String userID = "abc";
    private final String passwd = "abc";     
    public void init(ServletConfig config) throws ServletException
      super.init(config);
   protected void doGet(HttpServletRequest request, HttpServletResponse response)
   throws ServletException, IOException
      final int width = 550;
     final int height = 200;
/ title font (centre and report title)
     final Font fTitle0 = FontFactory.getFont("Helvetica", 42, Font.BOLD);
     final Font fTitle1 = FontFactory.getFont("Helvetica", 30, Font.BOLD);
          // centre name:
    final String title0 = bigTitle;
   // Default category for DefaultCategoryDataset
   final String cat = "data";
   Connection conn;
  JFreeChart chart;
   String title1     = "xyz Report";
   String chartDesc = "description";
   String notes[] = new String[4];
   String chartTitle = "so bad this is title";
   String chartXTitle = "this is x";
   String chartYTitle = "this is y.";
   String report = request.getParameter("report");     
   int max=-10000;
   int min=10000;
   int j=0;          
  // do some basic checking
   if (report == null || report.equals(""))
     report = "-1";  // this course unknow report error message
     String start   = request.getParameter("start");
     String end  = request.getParameter("end");
     String order_by  = request.getParameter("order_by");  // ToDo: check invalid string
       int topN  = 5;
    String order = (order_by.equals("desc")) ? "Top" : "Last";
   String inv[] = {"08:30", "09:30", "10:30", "11:30", "12:30", "11:30", "12:30", "13:30", "14:30", "15:30", "16:30", "17:30","18:30","19:30","20:30","21:30","22:30","23:30"};
     int inv_val[] = new int[inv.length - 1];
     try
        Class.forName(driver).newInstance();
         catch(Exception e)
        printE("Cannot load mysql database driver!", response);
          e.printStackTrace();
           return;
       try
             conn = DriverManager.getConnection(url, userID, passwd);
              if (report.equals("r1")) {  // report 1
           DefaultCategoryDataset dataset = new DefaultCategoryDataset();
          Statement stmt = conn.createStatement();
          String sql = "select *,count(f.Name),f.Name from film f, filmDetail fd, ticket t where f.startDate > '" + start + "' and f.endDate <  '" + end + "'and fd.filmID = f.filmID and fd.filmDetailID = t.filmDetailID group by f.name order by fd.filmDetailID asc limit '" +topN+"'";
          ResultSet rs = stmt.executeQuery(sql);
        while (rs.next())
       if (rs.getInt("fd.filmDetailID") > max) max = rs.getInt("fd.filmDetailID");
     if (rs.getInt("fd.filmDetailID") < min) min = rs.getInt("fd.filmDetailID");
      j++;
       ataset.setValue(rs.getInt("fd.filmDetailID"), cat,rs.getString("f.Name"));
       title1     = titles[0];
     chartDesc  = descs[0];
     chartTitle = order + " " + topN + " popular movie";
      chartYTitle = "Box Office record";
      chartXTitle = "Film Name";
      gender = " ";
      chart = ChartFactory.createBarChart(chartTitle, chartXTitle,   chartYTitle, dataset,PlotOrientation.VERTICAL, false, true, false);
    else
          print("Error: I don't inderstand your request!", response);
     return;
       catch (SQLException e)
     printE("Cannot open database connection? <br>", response);
     // printE(e.toString);
  e.printStackTrace();
  return;
     response.setContentType("application/pdf");
     Document document = new Document(PageSize.A4, 5, 5, 5, 5);
    try
         PdfWriter writer;
     writer = PdfWriter.getInstance(document, response.getOutputStream());
    HeaderFooter footer = new HeaderFooter(new Phrase("Page: "), true);
     footer.setBorder(Rectangle.NO_BORDER);
document.setFooter(footer);
               footer.setAlignment(Element.ALIGN_CENTER);
               // step 3
               document.open();
               document.add(getHeader(title0, title1, start, end, gender, order, topN, chartDesc));
               document.add(printChart(chart, writer));
               document.add(getFooter(notes));
          catch(DocumentException de)
               de.printStackTrace();
          // step 5
          document.close();
          return;
     }// end doGet()
     /** Handles the HTTP <code>POST</code> method.
      * @param request servlet request
      * @param response servlet response
     protected void doPost(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException
          // processRequest(request, response);
     /** Returns a short description of the servlet.
     public String getServletInfo()
          return "Generate reports for " + bigTitle;
     /* To print en error and exit(?) */
     private void printE(Object obj, HttpServletResponse response) throws IOException
          response.setContentType("text/html");
          PrintWriter out;
          out = response.getWriter();
          out.print(obj.toString());
          out.close();
          // To-Do: how to force exiting?
     // create data chart
     private PdfPTable getHeader(String title0, String title1, String start, String end, String sex, String order, int topN, String desc)
          Font fTitle0 = FontFactory.getFont("Helvetica", 42, Font.BOLD);
          Font fTitle1 = FontFactory.getFont("Helvetica", 24, Font.BOLD);
          Font fTitle3 = FontFactory.getFont("Helvetica", 12, Font.BOLD);
          Font fValue = FontFactory.getFont("Helvetica", 12, Font.UNDERLINE);
          Paragraph parStartEnd = new Paragraph();
          parStartEnd.add(new Phrase("Data start from:                  ", fTitle3));
          parStartEnd.add(new Phrase(start, fValue));
          parStartEnd.add(new Phrase("     to     ", fTitle3));
          parStartEnd.add(new Phrase(end, fValue));
          Paragraph parGenerateDate = new Paragraph();
          parGenerateDate.add(new Phrase("Report generated at:         ", fTitle3));
          parGenerateDate.add(new Phrase(new java.util.Date().toString(), fValue));
          Paragraph parGender = new Paragraph();
          parGender.add(new Phrase("Current show gender:       ", fTitle3));
          parGender.add(new Phrase(sex, fValue));
          Paragraph parTopN = new Paragraph();
          parTopN.add(new Phrase("Now is showing                 ", fTitle3));
          parTopN.add(new Phrase(order, fValue));
          parTopN.add(new Phrase("  ", fValue));
          parTopN.add(new Phrase(new Integer(topN).toString(), fValue));
          parTopN.add(new Phrase("   record(s)", fTitle3));
          // Start main table
          PdfPTable tblMain = new PdfPTable(1);
          tblMain.getDefaultCell().setBorder(0);
          // Print title
          tblMain.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
          tblMain.addCell(new Paragraph(title0, fTitle0));
          tblMain.addCell(new Paragraph(title1, fTitle1));
          tblMain.addCell("");
          tblMain.addCell("");
          tblMain.addCell("");
          // Print headers data
          //tblMain.getDefaultCell().setHorizontalAlignment(Element.ALIGN_RIGHT);
          //tblMain.addCell(parInvoiceNum);
          //tblMain.addCell("");
          tblMain.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
          tblMain.addCell(parStartEnd);
          tblMain.addCell("");
          tblMain.addCell(parGenerateDate);
          tblMain.addCell("");
          if (sex != " ")
               tblMain.addCell(parGender);
          else if(order != null && topN > 0)
               tblMain.addCell(parTopN);
          else
               tblMain.addCell(" \n");
          tblMain.addCell("");
          tblMain.setWidthPercentage(96);
          tblMain.addCell(new Paragraph("Description of this report:", fTitle3));
          tblMain.addCell(desc);
          tblMain.addCell("\n");
          // Finish main table
          return tblMain;
     // print a chart _directly_ to pdf and return a empty Pdftable...
     public PdfPTable printChart(JFreeChart chart, PdfWriter writer)
          PdfContentByte cb = writer.getDirectContent();
          int width = 550;
          int height = 450;
          PdfTemplate tp = cb.createTemplate(width, height);
          Graphics2D g2d = tp.createGraphics(width, height, new DefaultFontMapper());
          Rectangle2D r2d = new Rectangle2D.Double(0, 0, width, height); //->,
          chart.draw(g2d, r2d);
          g2d.dispose();
          cb.addTemplate(tp, 20, 170);
          // quick method to push down the footer text
          // the only things this method return
          PdfPTable tblDownDown = new PdfPTable(1);
          tblDownDown.getDefaultCell().setBorder(0);
          tblDownDown.addCell(" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n");
          tblDownDown.addCell(" \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n");
          tblDownDown.addCell(" \n \n \n \n \n \n");
          return tblDownDown;
     public PdfPTable getFooter(String notes[])
          Font fNote = FontFactory.getFont("Helvetica", 14, Font.UNDERLINE);
          Font fComment = FontFactory.getFont("Helvetica", 12, Font.ITALIC);
          Font fTitle1 = FontFactory.getFont("Helvetica", 30, Font.ITALIC);
          // Start footer table
          PdfPTable tblFooter = new PdfPTable(1);
          tblFooter.getDefaultCell().setBorder(0);
          if (notes != null)
               tblFooter.addCell(new Paragraph("Notes:", fNote));
               tblFooter.addCell("");
               tblFooter.addCell("");
               tblFooter.getDefaultCell().setHorizontalAlignment(Element.ALIGN_LEFT);
               for (int i=0;i<notes.length;i++)
                    if (notes[i] != null)
                         tblFooter.addCell(new Paragraph("" + (i+1) + ". " + notes[i] + "", fComment));
                         tblFooter.addCell("");
                         tblFooter.addCell("");
                    tblFooter.getDefaultCell().setHorizontalAlignment(Element.ALIGN_CENTER);
                    tblFooter.addCell(new Paragraph("- End of report -", fComment));
                    return tblFooter;
}

Go to the cache directory and see if you can open the report directly from here (not in IE).
I have seen posts on problems with Acrobat Reader Plugin for IE (I believe it was version 6 of Reader).

Similar Messages

  • Report with PDF format in IExplorer problem

    report with PDF format in IExplorer problem
    Hi,
    when i make the desformat=PDF it gave me error
    "file does not start with '%PDF' " in the IExplorer despite i have updated version of Acrobat reader and IE.
    I'm using this URL:
    http://bss9i.stc.com.sa:7779/reports/rwservlet?destype=SCREEN&desformat=PDF&report=CR1.rdf&userid=webcr/webcr1@cr&p_cr='AP/63'.
    Any suggestion is greatly appreciated.
    Thanks.
    Kamal Khafagy

    Shouldn't destype be CACHE?

  • Problem in converting reports  to PDF format - bug

    dear all,
    There is a problem in converting the reports in PDF format.
    The situation is that if we use the tool bar icon in SAP B1 to get the reports in PDF format, there are printing errors. The output PDF file does not contain the exact data that is in the report, the values are getting interchanged and mismatched.
    But if we do the same using the print in the PDF option in choose from printers window as we do regular pringting, the document is printed properly.
    what may be the cause for this bug like thing. How can we solve it??
    please help me..
    thanks and regards,
    Yeshwanth Prakash

    Check this SAP Note: 1089388     Incorrect value in exported PDF when Concat function is used
    [https://websmp130.sap-ag.de/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/smb_searchnotes/display.htm?note_langu=E&note_numm=1089388]

  • How to generate report in pdf format through a JSP page

    I require to generate my report from my JSP page into a PDF format . How can i do it?

    Use a Java API which can create PDF files based on some collection of plain vanilla Java objects (List, String, Number, etc).
    Google can find them all. Just feed it with something like "Java PDF API" or so. A commonly used one is iText.
    That said, when talking about this in JSP context, ensure that you do NOT write raw Java code in JSP files using scriptlets. Raw Java code belongs in Java classes. In such case you need a Servlet. In JSP just use taglibs and EL to interact with backend Java code and data. Scriptlets are discouraged since over a decade.

  • Generating Report in PDF Format.

    Hi All,
    How can I configure Report Server to generate all my Reports in PDF Destination Format? I am using Oracle 10g.
    In 6i, it used to be FORMS60_REPFORMAT parameter. Is there any equivalant in 10g? Where can I set it? or Is there any other way to configure Report Server?
    I may set desformat in rp2rro.pll but I would like to have it at Report Server level.
    Thanks for your help in advance.

    If you want to run all your reports using a generic file, then use web.show_document within Forms and set your desformat for each report in the cgicmd.dat file (in Oracle_home/reports/conf directory) on the App Server.
    Please be warned that any change to this file will require bouncing the report server (or the app server as I sometimes find it doesn't always pick up the changes).
    HTHs
    L :-)

  • JSP Reports with PDF format ouput

    Hello,
    Could anyone help me out in creating a output both in excel and pdf format thru JSP reports.
    I have created JSP report which is for excel format output, but I want to know, is it possible to have pdf format also with JSP report.
    Thanks.

    Hello,
    You can search in the Forum :
    For example:
    jsp report desformat=pdf
    Regards

  • How To Generate And Print Reports In PDF Format From EBS With The UTF8 Char

    Hi,
    I want to know How To Generate And Print Reports In PDF Format From EBS With The UTF8 Character Set in R12.0.4.
    Regards

    Refer to Note: 239196.1 - PASTA 3.0 Release Information
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=239196.1
    Or, you can use XML Publisher.
    Note: 551591.1 - Need Latest XML Publisher / BI Publisher Patches For R12
    https://metalink.oracle.com/metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=551591.1

  • Error 500 Internal Server Error" When Generating Hyperion Financial Reports in PDF Format

    We are unable to open pdf reports in Workspace with the following error. It was all working fine and doesn't work now for unknown reasons.
    Error 500 Internal Server Error" When Generating Hyperion Financial Reports in PDF Format
    We are on 11.1.2.1 environment. Ghost Script 8.54 and Java heap settings xms256m and xmx512m.
    Please advice.

    hello,
    just to clarify
    a) the parameter is named DESFORMAT not :DESFORMAT, there is
    no : in front of the name, if you submit it via URL !
    b) there are some issues with acrobat5 and IE but those are not
    only caused by PDFs generated with oracle reports.
    regards,
    the oracle reports team --pw                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Deadlock with thread issues while generating reports with Crystal Report XI

    We are facing deadlock with thread issues while generating report with Crystal Report XI
    Version Number is 11.0 and the database used is Oracle
    In the log file on line number 74350  by 2008/12/16 13:35:54 there is a dead lock with Thread: u20184u2019 is waiting to acquire lock for 'com.crystaldecisions.reports.queryengine.av@15214b9' which is held by the Thread: '0'.
    And  a dead lock with Thread: u20180u2019 is waiting to acquire lock for 'com.crystaldecisions.reports.queryengine.av@15214b9' which is held by the Thread: '4'.
    Exactly after 10 minutes we can see the thread 4 and 0 are declared as STUCK by 2008/12/16  13:45:54 .
    Is this an existing issue with Crystal Report?
    Is there some solution for this problem?
    THE LOG FILE INFORMATION IS GIVEN BELOW
    [deadlocked thread] [ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)':
    Thread '[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)'' is waiting to acquire lock 'com.crystaldecisions.reports.queryengine.av@15214b9' that is held by thread '[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)''
    Stack trace:
         com.crystaldecisions.reports.queryengine.av.V(Unknown Source)
         com.crystaldecisions.reports.queryengine.av.do(Unknown Source)
         com.crystaldecisions.reports.queryengine.as.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.c(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a.b.a(Unknown Source)
         com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
         com.sysarris.aris.crystalreports.RepServlet.generateReport(RepServlet.java:65)
         com.sysarris.aris.crystalreports.RepServlet.doPost(RepServlet.java:40)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    [deadlocked thread] [ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)':
    Thread '[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'' is waiting to acquire lock 'com.crystaldecisions.reports.queryengine.av@12e0415' that is held by thread '[ACTIVE] ExecuteThread: '4' for queue: 'weblogic.kernel.Default (self-tuning)''
    Stack trace:
         com.crystaldecisions.reports.queryengine.av.V(Unknown Source)
         com.crystaldecisions.reports.queryengine.av.do(Unknown Source)
         com.crystaldecisions.reports.queryengine.as.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.c(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.datainterface.j.a(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.b(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.cy.long(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.a(Unknown Source)
         com.crystaldecisions.reports.common.ab.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.if(Unknown Source)
         com.crystaldecisions.reports.reportdefinition.a1.o(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a(Unknown Source)
         com.crystaldecisions.reports.reportengineinterface.a.a.b.a(Unknown Source)
         com.crystaldecisions.reports.sdk.ReportClientDocument.open(Unknown Source)
         com.sysarris.aris.crystalreports.RepServlet.generateReport(RepServlet.java:65)
         com.sysarris.aris.crystalreports.RepServlet.doPost(RepServlet.java:40)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
         weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:225)
         weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:127)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:272)
         weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:165)
         weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3153)
         weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
         weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
         weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:1973)
         weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:1880)
         weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1310)
         weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
         weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
    Can you please suggest any work around for this?

    I'm not referring to Servlet threading issues.
    I'll clarify.
    You have two threads, both entering ReportClientDocument.open(...) method.
    Thread 4 is waiting to acquire 'com.crystaldecisions.reports.queryengine.av@15214b9'
    Thread 0 is waiting to acquire ''com.crystaldecisions.reports.queryengine.av@12e0415'
    So I'm thinking ??? are they the same objects?
    My specific question concerning the ReportClientDocument is that both are calling open - i.e., trying to open a new report.  You wouldn't be trying to open different reports using the same ReportClientDocument - so was wondering if you've cached the RCD and trying to open two different reports at the same time on the same instance via different threads.
    You'd normally tie a ReportClientDocument instance to a HTTP Session, to ensure each user gets their own copy.
    Sincerely,
    Ted Ueda

  • 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

  • Hi, I have big problems since 2 weeks with outline, fonts, size in Ai CS6 : Numerical value are so big

    Hi, I have big problems since 2 weeks with outline, fonts, size in Ai CS6 : Numerical value are so big and I can't change it with smaller. Apparently Ai said me that comes from AiPrefs... Could you help me please.
    I tried to initialize my preferences but nothing change.
    PS : Sorry for my English, I'm French
    Pierre

    Pierre,
    You may try the list and see how far down you need to go; you have probably been through 1) and 2), and 4) is both reversible and more thorough than 3); 5) is hardly relevant, so you may end up with 6).
    The following is a general list of things you may try when the issue is not in a specific file (you may have tried/done some of them already); 1) and 2) are the easy ones for temporary strangenesses, and 3) and 4) are specifically aimed at possibly corrupt preferences); 5) is a list in itself, and 6) is the last resort.
    If possible/applicable, you should save current artwork first, of course.
    1) Close down Illy and open again;
    2) Restart the computer (you may do that up to at least 5 times);
    3) Close down Illy and press Ctrl+Alt+Shift/Cmd+Option+Shift during startup (easy but irreversible);
    4) Move the folder (follow the link with that name) with Illy closed (more tedious but also more thorough and reversible);
    5) Look through and try out the relevant among the Other options (follow the link with that name, Item 7) is a list of usual suspects among other applications that may disturb and confuse Illy, Item 15) applies to CC, CS6, and maybe CS5);
    Even more seriously, you may:
    6) Uninstall, run the Cleaner Tool (if you have CS3/CS4/CS5/CS6/CC), and reinstall.
    http://www.adobe.com/support/contact/cscleanertool.html

  • How to generate report with dynamic variable number of columns?

    How to generate report with dynamic variable number of columns?
    I need to generate a report with varying column names (state names) as follows:
    SELECT AK, AL, AR,... FROM States ;
    I get these column names from the result of another query.
    In order to clarify my question, Please consider following table:
    CREATE TABLE TIME_PERIODS (
    PERIOD     VARCHAR2 (50) PRIMARY KEY
    CREATE TABLE STATE_INCOME (
         NAME     VARCHAR2 (2),
         PERIOD     VARCHAR2 (50)     REFERENCES TIME_PERIODS (PERIOD) ,
         INCOME     NUMBER (12, 2)
    I like to generate a report as follows:
    AK CA DE FL ...
    PERIOD1 1222.23 2423.20 232.33 345.21
    PERIOD2
    PERIOD3
    Total 433242.23 56744.34 8872.21 2324.23 ...
    The TIME_PERIODS.Period and State.Name could change dynamically.
    So I can't specify the state name in Select query like
    SELECT AK, AL, AR,... FROM
    What is the best way to generate this report?

    SQL> -- test tables and test data:
    SQL> CREATE TABLE states
      2    (state VARCHAR2 (2))
      3  /
    Table created.
    SQL> INSERT INTO states
      2  VALUES ('AK')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AL')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('AR')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('CA')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('DE')
      3  /
    1 row created.
    SQL> INSERT INTO states
      2  VALUES ('FL')
      3  /
    1 row created.
    SQL> CREATE TABLE TIME_PERIODS
      2    (PERIOD VARCHAR2 (50) PRIMARY KEY)
      3  /
    Table created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD1')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD2')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD3')
      3  /
    1 row created.
    SQL> INSERT INTO time_periods
      2  VALUES ('PERIOD4')
      3  /
    1 row created.
    SQL> CREATE TABLE STATE_INCOME
      2    (NAME   VARCHAR2 (2),
      3       PERIOD VARCHAR2 (50) REFERENCES TIME_PERIODS (PERIOD),
      4       INCOME NUMBER (12, 2))
      5  /
    Table created.
    SQL> INSERT INTO state_income
      2  VALUES ('AK', 'PERIOD1', 1222.23)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('CA', 'PERIOD1', 2423.20)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('DE', 'PERIOD1', 232.33)
      3  /
    1 row created.
    SQL> INSERT INTO state_income
      2  VALUES ('FL', 'PERIOD1', 345.21)
      3  /
    1 row created.
    SQL> -- the basic query:
    SQL> SELECT   SUBSTR (time_periods.period, 1, 10) period,
      2             SUM (DECODE (name, 'AK', income)) "AK",
      3             SUM (DECODE (name, 'CA', income)) "CA",
      4             SUM (DECODE (name, 'DE', income)) "DE",
      5             SUM (DECODE (name, 'FL', income)) "FL"
      6  FROM     state_income, time_periods
      7  WHERE    time_periods.period = state_income.period (+)
      8  AND      time_periods.period IN ('PERIOD1','PERIOD2','PERIOD3')
      9  GROUP BY ROLLUP (time_periods.period)
    10  /
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> -- package that dynamically executes the query
    SQL> -- given variable numbers and values
    SQL> -- of states and periods:
    SQL> CREATE OR REPLACE PACKAGE package_name
      2  AS
      3    TYPE cursor_type IS REF CURSOR;
      4    PROCEDURE procedure_name
      5        (p_periods   IN     VARCHAR2,
      6         p_states    IN     VARCHAR2,
      7         cursor_name IN OUT cursor_type);
      8  END package_name;
      9  /
    Package created.
    SQL> CREATE OR REPLACE PACKAGE BODY package_name
      2  AS
      3    PROCEDURE procedure_name
      4        (p_periods   IN     VARCHAR2,
      5         p_states    IN     VARCHAR2,
      6         cursor_name IN OUT cursor_type)
      7    IS
      8        v_periods          VARCHAR2 (1000);
      9        v_sql               VARCHAR2 (4000);
    10        v_states          VARCHAR2 (1000) := p_states;
    11    BEGIN
    12        v_periods := REPLACE (p_periods, ',', ''',''');
    13        v_sql := 'SELECT SUBSTR(time_periods.period,1,10) period';
    14        WHILE LENGTH (v_states) > 1
    15        LOOP
    16          v_sql := v_sql
    17          || ',SUM(DECODE(name,'''
    18          || SUBSTR (v_states,1,2) || ''',income)) "' || SUBSTR (v_states,1,2)
    19          || '"';
    20          v_states := LTRIM (SUBSTR (v_states, 3), ',');
    21        END LOOP;
    22        v_sql := v_sql
    23        || 'FROM     state_income, time_periods
    24            WHERE    time_periods.period = state_income.period (+)
    25            AND      time_periods.period IN (''' || v_periods || ''')
    26            GROUP BY ROLLUP (time_periods.period)';
    27        OPEN cursor_name FOR v_sql;
    28    END procedure_name;
    29  END package_name;
    30  /
    Package body created.
    SQL> -- sample executions from SQL:
    SQL> VARIABLE g_ref REFCURSOR
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2,PERIOD3','AK,CA,DE,FL', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         CA         DE         FL                                             
    PERIOD1       1222.23     2423.2     232.33     345.21                                             
    PERIOD2                                                                                            
    PERIOD3                                                                                            
                  1222.23     2423.2     232.33     345.21                                             
    SQL> EXEC package_name.procedure_name ('PERIOD1,PERIOD2','AK,AL,AR', :g_ref)
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR                                                        
    PERIOD1       1222.23                                                                              
    PERIOD2                                                                                            
                  1222.23                                                                              
    SQL> -- sample execution from PL/SQL block
    SQL> -- using parameters derived from processing
    SQL> -- cursors containing results of other queries:
    SQL> DECLARE
      2    CURSOR c_period
      3    IS
      4    SELECT period
      5    FROM   time_periods;
      6    v_periods   VARCHAR2 (1000);
      7    v_delimiter VARCHAR2 (1) := NULL;
      8    CURSOR c_states
      9    IS
    10    SELECT state
    11    FROM   states;
    12    v_states    VARCHAR2 (1000);
    13  BEGIN
    14    FOR r_period IN c_period
    15    LOOP
    16        v_periods := v_periods || v_delimiter || r_period.period;
    17        v_delimiter := ',';
    18    END LOOP;
    19    v_delimiter := NULL;
    20    FOR r_states IN c_states
    21    LOOP
    22        v_states := v_states || v_delimiter || r_states.state;
    23        v_delimiter := ',';
    24    END LOOP;
    25    package_name.procedure_name (v_periods, v_states, :g_ref);
    26  END;
    27  /
    PL/SQL procedure successfully completed.
    SQL> PRINT g_ref
    PERIOD             AK         AL         AR         CA         DE         FL                       
    PERIOD1       1222.23                           2423.2     232.33     345.21                       
    PERIOD2                                                                                            
    PERIOD3                                                                                            
    PERIOD4                                                                                            
                  1222.23                           2423.2     232.33     345.21                       

  • Problem after run report with spreadsheet

    hi evry one
    ther an a problem after run report with spreadsheet .
    after runing iexplorar open and close fast no thing else
    when i check the job from appserver job success with spreadsheet dis format.
    what shall i do.
    thanks.

    Hello,
    Do you use the Oracle Forms builtin WEB.SHOW_DOCUMENT ?
    If yes , take a look to : "IE7 windows opened and closed immediatly"
    http://www.experts-exchange.com/Software/Internet_Email/Web_Browsers/Internet_Explorer/Q_23304982.html
    You can test the solution suggested :
    We have found the setting that we needed, under the Internet Options
    Security tab, if you select the internet zone, and click the custom level
    button, then scroll down to the Downloads section, the first option is
    Automatic prompting for file downloads, setting this to enable keeps IE 7
    from interfering with this sort of download.
    Regards
    Example with screen shots :
    http://www.celt.iastate.edu/webct/securitysettings.html
    Regards

  • Generate report in pdf in rute specifics??

    Hi, I have a form whit a button to generate report in pdf, works fine, but i want that when the user press the button, a window opened and the user choose where want to save the pdf...
    I think that i need some libs but i dont know, and i dont know the code to insert in button to open this window.
    Please Help

    Hi there
    Firstly what version are you running of Forms/Reports?
    Secondly, if you are running 9i/10g, when the PDF document is presented, the user will be able to save it in a location of their choice. When you call the report you can tell the app server where to save a copy of the file, but you will have to keep in mind that the location will be relative to the app server and not the client machine. Besides the results are normally cached on the app server, so all you will have to do is remember the job id and request the results again via a http call.
    Cheers
    Q

  • Problem scheduling webi reports with XI3.1 pending forever

    Hello,
    I've got a problem scheduling webi reports with XI3.1 scheduler.
    After confiming scheduling job (loggin in with "administrator" user), status remains "pending" forever(using Infoview or CMC).
    I tried different job recurrence a modalities (attachment formats, destination user etc).
    I also try to add (-javaArgs "Xmx900m,Xincgc,server") wich is the SAP solution found on its portal but it does not work.
    I use BO XI 3.1 in Windows 2003 server, after the install I reduced the maximum memory of Java in the tomcat 5.5.2 server from 1024 to 512 because the server never started with the initial size.
    Please I need Help.
    thanks in advance,
    Samy

    Hi,
    Below SAP solution found found in BOB Forum.
    I applied this solution and now everything works fine !!
    I just add  this -javaArgs "Xmx900m,Xincgc,server"  in the command line of the server
    Hope this helps:
    Symptom
    Scheduled WebIntelligence reports remain stuck in 'pending' status after installing Microsoft windows patches of April 2009. Restarting the Adaptive Job Server, Central Management Server or Server Intelligence Agent has no effect.
    The Event Viewer logs show the following entry: Unable to start the sub-process (Job Server Child). Cause : Couldn't get IJob interface or writing IAudit: Pipe exception. Reason: jobserverchild (WebIJavaSchedulingService ReplicationSchedulingService, 0, Timeout waiting for Child [4716] to register ([120]seconds).
    Reproducing the Issue
    Install Business Objects Enterprise XI 3.x on a French Windows 2003 SP2 32bits server
    Install the following Microsoft windows update patches of April 2009:
    KB923561, KB925336, KB952004, KB956572, KB959426, KB960225, KB960803, KB961373, KB967715
    Schedule a WebIntelligence report
    The report remains in Pending status
    Business Objects Enterprise XI 3.1
    Windows 2003 SP2 32bit (French)
    Microsoft windows patches of April 2009
    Cause
    With Microsoft windows patches of April 2009, the maximum Heap Size for java processes has been reduced to under 1000MB.
    Resolution
    Apply the following steps to fix the issue:
    Launch the Central Management Console
    Select Servers
    Right click on <server_name>.Adaptive Job Server and select Properties
    Add the switch -javaArgs "Xmx900m,Xincgc,server" in the command line of the server
    Click on Save and Close
    Restart the <server_name>.Adaptive Job Server
    Regards .
    Sam.
    Edited by: samouber on Aug 21, 2009 2:54 PM

Maybe you are looking for

  • SSRS - Oracle Stored procedure returns no data but does in SQL Developer Sudio

    HI there, Stored procedure returns no data when executed on the report but when i execute the stored procedure in Sql Developer it returns required rows. Thanks for your help!

  • Resetting Reversed Document

    Hii. User has reversed a payment document by mistake.Now we want the same document  to reset.Is there any way to do so. Regards, D RANA Edited by: Deepak Rana on Feb 7, 2009 4:59 PM

  • E61 - complete failure to sync contacts using PC S...

    I just bought an E61. I have 1151 contacts in Outlook. I originally tried to use Exchange to sync contacts but after getting about 300 or so across, the process failed. So I figured, oh well, I'll try PC Sync and get my contacts in that way. Repeated

  • XFDF confused :(

    Ok, I'm designing a forms-based system using C# in Visual Studio 2005. My goal is to created a PDF form in LiveCycle Designer, put it on the website, send XFDF (or whatever) to the PDF on the client side to pre-populated it, then have the user submit

  • 10gAS detecting report errors from forms

    Hi We are running 10g reports and forms on Red Hat. The forms are run using a run_report_object command to generate pdf output and then displayed using web.show_document. The parameters for the reports are entered into a form and sometimes are valida