Error in exporting from Interactive Report to PDF format

Hello,
i am using APEX and from an Interactive Report i am trying to export using Download | PDF format. The table and corresponding report has only text fields. Database character set is UTF-8. Up to now i haven't been able to get a PDF file that can be open from Adobe Acrobat Reader. Every file fails opening with message like "Adobe Reader could not open filename.pdf, because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded). This happens for every report i have tried up to now. If i export report in CSV format all are ok.
Is there a known bug with PDF download of APEX?
TIA

See this link: http://www.oracle.com/technology/products/database/application_express/html/configure_printing.html
FOP & Cocoon are free (just need to install the software and configure) Bi Publisher I believe works only for Standard Reports and no Interactive reports at this time.. If you have the $$ BI Publisher is worth the investment!!
Also, it is rumored that APEX 4.0 will have the PDF generation built in as apposed to the current model where you need to bolt something on..
Thank you,
Tony Miller
Webster, TX

Similar Messages

  • 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                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • ORA-20876 in csv export from interactive report = Possibly a bug?

    Hi Apex team,
    yesterday i tried to download data to csv from an interactive report. The resulting csv file contained a "ORA-20876: Stop APEX Engine" only and no other data. I played around with other reports in my application and had no problems with exports.
    After some investigation i found out that the buggy report contains a column of display type "Display as text (based on a LOV, escape special characters)". When I changed this column type to "Standard Report Column" for example, the error didn't appear anymore and the csv export contained complete data.
    Maybe this is a bug? The environment is Apex 4.1.1.00.23 on 11g (UTF-8). Is there a workaround available?
    Regards,
    Jens
    Edited by: j.gauger on 06.02.2013 14:10
    Additional Information
    The problem seems to occur only if a Shared Components LOV of type "Static" is referenced in the IR column.

    Hi,
    what happens if you take the query from IR report and create a new classic report?
    On this report enable csv export and then try the export.
    Maybe that (format) data are causing export to fail.
    Try to export just one row in your IR report (and classic report), so that you add where rownum < 2.
    Regards,
    Aljaz
    Edited by: Aljaz on 6.3.2012 23:11
    Edited by: Aljaz on 6.3.2012 23:29

  • IllegalArgumentException error while exporting report in PDF format

    Hi all,
    we are using Crystal Report 2008, Java 1.5.22 and JRC 11.8.4.1094 to export reports in pdf format within java.
    It is working fine for all reports except for a specific report where it gives IllegalArgumentException while exporting the PDF.
    Below the error occurred:
    12:39:16,875 ERROR [c] Disk Exporter: no output file was created by an exporter
    12:39:16,875 ERROR <b> PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob (from destination?); aborting export
    java.lang.IllegalArgumentException
         at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
         at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
         at com.crystaldecisions.reports.a.e.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
    12:39:16,875 INFO  [c] Disk Exporter: finalizing export to destination
    12:39:16,875 ERROR [JRCCommunicationAdapter] Failed to export report
    com.crystaldecisions.reports.exporters.format.page.pdf.a.a: Unknown exception is thrown
         at com.crystaldecisions.reports.exporters.format.page.pdf.b.a(Unknown Source)
         at com.crystaldecisions.reports.a.e.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.if(Unknown Source)
         at com.crystaldecisions.reports.formatter.a.c.a(Unknown Source)
         at com.businessobjects.reports.sdk.b.b.int(Unknown Source)
         at com.businessobjects.reports.sdk.JRCCommunicationAdapter.request(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.x.a(Unknown Source)
         at com.crystaldecisions.proxy.remoteagent.q.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.dd.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.a(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.ReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.AdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.sdk.occa.report.application.NonDCPAdvancedReportSource.export(Unknown Source)
         at com.crystaldecisions.reports.reportengineinterface.JPEReportSource.export(Unknown Source)
         at com.crystaldecisions.report.web.event.br.a(Unknown Source)
         at com.crystaldecisions.report.web.event.w.a(Unknown Source)
         at com.crystaldecisions.report.web.event.b7.broadcast(Unknown Source)
         at com.crystaldecisions.report.web.event.av.a(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.do(Unknown Source)
         at com.crystaldecisions.report.web.WorkflowController.doLifecycle(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.a(Unknown Source)
         at com.crystaldecisions.report.web.viewer.ReportExportControl.a(Unknown Source)
         at com.crystaldecisions.report.web.ServerControl.getHtmlContent(Unknown Source)
    Caused by: java.lang.IllegalArgumentException
         at com.crystaldecisions.reports.exporters.destination.disk.c.a(Unknown Source)
         ... 56 more
    Have an idea?
    Thanks

    Hello Andrea.
    I searched through the SAP Notes for the error that you are encountering.  There is an SAP Note that exists titled the following:
    1332907 - Report being exported to PDF format using the Crystal Reports for Eclipse 1.x runtime, errors with the exception: PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob
    Since you may not have access to the SAP Notes, I will extract the details that are mentioned in the note here:
    =============================================
    Symptom
    Attempting to export a report to Adobe PDF format using the Crystal Reports for Eclipse 1.x runtime results in an exception.
    The exception indicates "PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob"
    Environment
    Windows 2003
    Apache Tomcat 5.0
    Crystal Reports for Eclipse version 1.x
    Reproducing the Issue
    Using the Crystal Reports for Eclipse runtime version 1.x attempt to export a report to PDF format that has the "Repeat Group Header on Each Page" option enabled.
    Note: This does not occur if this option is enabled in a subreport.
    Cause
    When the "Repeat Group Header on Each Page" is enabled for a group in a main report the Crystal Reports for Eclipse 1.x runtime is unable to correclty format the PDF document which results in an exception.
    Resolution
    Updating the application to use Crystal Reports for Eclipse version 2.x runtime will resolve the issue.
    The most recent updates to the Crystal Reports for Eclipse runtime can be freely downloaded from the SAP SDN Website. 
    http://www.sdn.sap.com/irj/boc/crystalreports-java
    =============================================
    Since you are on JRC 11.8.4.1094 which is Crystal Reports for Eclipse 1.x, this may be the cause of your problem.
    I hope that this helps.
    Regards.
    - Robert

  • Analytics: Error msg while downlodaing report in PDF format.

    Sax parser returned an exception. Message: Expected an element name, Entity publicId: , Entity systemId: , Line number: 93, Column number: 56
    Error Details
    Error Codes: UH6MBRBC
    Please let me know, how to overcome this issue..

    Hello Andrea.
    I searched through the SAP Notes for the error that you are encountering.  There is an SAP Note that exists titled the following:
    1332907 - Report being exported to PDF format using the Crystal Reports for Eclipse 1.x runtime, errors with the exception: PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob
    Since you may not have access to the SAP Notes, I will extract the details that are mentioned in the note here:
    =============================================
    Symptom
    Attempting to export a report to Adobe PDF format using the Crystal Reports for Eclipse 1.x runtime results in an exception.
    The exception indicates "PdfExporter: caught Exception in PDFFormatter.finalizeFormatJob"
    Environment
    Windows 2003
    Apache Tomcat 5.0
    Crystal Reports for Eclipse version 1.x
    Reproducing the Issue
    Using the Crystal Reports for Eclipse runtime version 1.x attempt to export a report to PDF format that has the "Repeat Group Header on Each Page" option enabled.
    Note: This does not occur if this option is enabled in a subreport.
    Cause
    When the "Repeat Group Header on Each Page" is enabled for a group in a main report the Crystal Reports for Eclipse 1.x runtime is unable to correclty format the PDF document which results in an exception.
    Resolution
    Updating the application to use Crystal Reports for Eclipse version 2.x runtime will resolve the issue.
    The most recent updates to the Crystal Reports for Eclipse runtime can be freely downloaded from the SAP SDN Website. 
    http://www.sdn.sap.com/irj/boc/crystalreports-java
    =============================================
    Since you are on JRC 11.8.4.1094 which is Crystal Reports for Eclipse 1.x, this may be the cause of your problem.
    I hope that this helps.
    Regards.
    - Robert

  • Download data from interactive report

    Hi all. I'm on apex 3.1.1.00.09.
    I have this problem: when I download data from interactive report I can download only in CSV and PDF. If I try to download into pdf it creates a file of only 1 KB.
    I would know if I must configure my apex in order to download correctly in pdf and if I must configure it in order to download in doc and xls format.
    Thanks all for collaboration,
    Fabrizio

    Thank you for your reply.
    I am able to download the csv file, but my problem is: I don't want the column headings to show.
    Is it possible to download only the data, not the column headings?

  • Export Arabic Crystal Report To PDF

    Hi,
    I am using JRC component to build crystal reports in English & Arabic. All works well except exporting Arabic crystal report to PDF?
    Crystal File Format Schema: 12.0.0
    I was reading another 3 years old thread and this was stated there:
    "If you are using the Java Reporting Component, you will not be able to see Arabic characters in your PDF document because the JRC does not support font embedding, and only works with a specific character set when exporting to Adobe" Any from SAP can you please confirm that does this still hold true? And are there any chances or plan to add support in future?
    Regards
    SC

    Please disregard that part of the previous message.
    As mentioned earlier, it depends on which of our products you are using to export the report.  If you are using the Java Reporting Component, you will not be able to see Arabic characters in your PDF document because the JRC does not support font embedding, and only works with a specific character set when exporting to Adobe.
    If you are using the Crystal Reports designer or BusinessObjects Enterprise SDK to export the report, you will need to ensure you have the character set installed on the same machine; for BOE SDK it needs to be on the machine with all of the services.

  • APEX_040100.WWV_FLOW_API Error while creating a Interactive Report Region

    I am getting the following error while creating an Interactive report region on a page. (version - 4.1.0.00.32)
    Error Unable to create Dynamic Query page.
    ORA-04065: not executed, altered or dropped ORA-04065: not executed, altered or dropped stored procedure "APEX_040100.WWV_FLOW_API" ORA-06508: PL/SQL: could not find program unit being called: "APEX_040100.WWV_FLOW_API"
    DBA complied package but the error persists.
    Does anyone know how to debug this
    Thanks,
    Priyanka

    Hello ???,
    We are experiencing this too at login in an application. The error is caused by violating the constraint WWV_FLOW_DATA_IDX1 on columns FLOW_INSTANCE, ITEM_ID in table WWV_FLOW_DATA. So for some reason the value of an item in session state is set multiple times.
    When looking at the Access view (statement below) I see that there are multiple logins per second for a user (I have seen 12 times as maximum).
    select login_name, application, access_date, count(*)
    from WWV_FLOW_USER_ACCESS_LOG_V
    group by login_name, application, access_date
    having count(*) > 1
    order by access_date descSince this count of logins varies from 1 to 12, it looks like it is not caused by the application itself, but I also don't have a clue what the root cause is.
    Is there anyone else with more information on this issue?
    We are on APEX 4.0 and Oracle 11g and the applications have all been built in this environment, so no upgrades have been performed.
    Regards, Wouter
    Edited by: Wouter Breeuwsma on 31-mei-2012 12:05

  • Error while navigating from a report in OBIEE

    I get the below error while navigating from one report to another report
    Odbc driver returned an error (SQLExecDirectW).
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred.
    [nQSError: 16001] ODBC error state: 37000 code: 1101 message: [Microsoft][ODBC SQL Server Driver][SQL Server]Could not allocate a new page for database 'TEMPDB'
    because of insufficient disk space in filegroup 'DEFAULT'. Create the necessary space by dropping objects in the filegroup
    , adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup..
    [nQSError: 16015] SQL statement execution failed. (HY000).
    Any inputs on this is highly appreciated.
    Thanks,
    Vasavi

    Hi Vasavi,
    There is no Temp space in Data base to run queries .Please contact your DBA to increase your db size
    thanks,
    saichand.v
    Edited by: Saichand Varanasi on Jul 14, 2010 7:35 AM

  • Recieved Error While trying to print the OBIEE report in PDF format

    Hi ,
    I recieved the following error while printing the OBIEE dashboard page in PDF format . Also I recieve the same error when i try to download the report in Powerpoint format .
    Assertion failure: rElement.countChildElements() <= vColumns.size() at line 457 of ./project/websubsystems/xslfopostprocessor.cpp
    Error Details
    Error Codes: OQ78YWIW
    I am not able to figure out reason behind this ..
    Please help !!!
    jyoti

    I am also recieving the same error message while trying to download my report in PDF format.Can anyone pls help to resolve this??
    Payel

  • Issues in exporting SSRS report to PDF format in Report Server - Blank spaces are deleted

    Hi Gurus,
    I have a problem in exporting SSRS report to PDF format. It deletes all the blank spaces when I use bullet in a Text box and try to export to PDF formt in Report Server . For example
    •             Project submitted to the TRC
    Result in PDF format:
         • ProjectsubmittedtotheTRC
    I also noted that when I try to export to PDF in Visual Stuio 2005 (Business Intelligence development studio), it does not delete any blank spaces and shows the correct aligned Data in PDF format.
    Please help me as it is frustrating a lot
    I would highly appreciate for your quick response 

    Was there ever a solution found for this as i have the same issue.
    When bullet point is entered in a field all the spaces are removed when exported to PDF
    i tried exporting to excel and it does not remove spaces, however this is no use to me as it needs to be in PDF
    Using IE 7 (Don't think the browser has anything to do with it as this happened via a subscription)
    Didn't know SSRS had specific Service Packs, i though they came as patches to SQL Server (SQL Server is on Service Pack 3)
    This should be easy to replicate all you need to do is copy text containing a bullet point into a sql server database field and then add this field to a report export to pdf and the spaces are gone
    Thanks in advance,
    Mark Brunton
    brunzire

  • 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

  • How to enhance the Excel export from Crystal Reports

    Hello,
    I am new in Crystal Reports and I wonder if it is possible to enhance the Excel export from Crystal Reports with post-processing that would be applied to the Excel exported file.
    By example, is it possible to freeze the window panes, so rows and columns are frozen in place on the screen?
    Is there any possibility to obtain the file exported to excel to work with.
    Or maybe there is some ways to parametrize the Excel export from Crystal Reports?
    Any suggestions are welcomed.

    If you are using Crystal Reports 2008 you can use the Report Application SDK that is now available.
    It has a object called PrintOutputController that has an export method that allows you to get access to the exported file before you send it to the user.
    Check the Developer library and the samples for details.
    <a href="/blog/10">Rob&#39;s blog - http://diamond.businessobjects.com/robhorne</a>

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

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

Maybe you are looking for

  • I am  download a copy of photo shop from the Internet, It showing the cannot be installed

    I downloaded a Copy of the Photoshop from a website [link removed] It showing the an error message while i am installing the photoshop in to my PC. [Moderator note... use an official Adobe site to download Adobe software... or a sales site such as Am

  • IPhone isn't recognized by iTunes or computer

    Both my computers are running Windows 7 (one 64 bit) but the 64 bit version doesn't recognize my iPhone 4 running iOS4.0.1 but the 32 bit version works perfectly (both computers have iTunes 9.2.1. When I plug the phone into the 64 bit computer it mak

  • Parking an accounting document - PRELIMINARY_POSTING_FB01

    Hello experts, We are using FM PRELIMINARY_POSTING_FB01 to park accounting documents. We are able to successfully park accounting documents using this FM but when we try to post the parked document using this FM, we are getting an error based on miss

  • Another Battery Query

    Hi, I've been reading through the posts for awhile now, and have tried all the Apple-recommended solutions to my battery problem (ie resetting it, etc), but nothing is working. I bought my mini brand new on October 1st 2005. Here is my story: - My ba

  • How do i put 3D line in flash 10

    Hi All, I'm new at flash 10 and wanted to know how do i draw a line between the middle of two objects. i have two canvas objects, one is in (x=0, y=0, z=10) and one is in (x=0, y=20, z=100) and i want to draw a line between the middle of the first ob