Problem on generating XMLP report

Hi,
I have generated a XML Publisher report using Application Engine (using row set).
The process runs to NO success and the following error appears in the log file.
xmlpublisher PTFOProcessor.generateOutput error.
Exception:null
Can anyone throw light on as what could be the possible reason for this error.
xmlpublisher PTFOProcessor.generateOutput error
Please help me on this.
thanks in advance
Venkat

You have a bunch of syntax errors there.
The code should look more like this:
declare
q varchar2(4000);
v_usuario varchar2(10);
begin
v_usuario := (CASE
WHEN :P101_USERNAME='janet' THEN  'JA'
WHEN :P101_USERNAME='cesar' THEN  'CC'
WHEN :P101_USERNAME='luisjavier' THEN  'LT'
WHEN :P101_USERNAME='mauricio' THEN  'MO'
WHEN :P101_USERNAME='enrique' THEN  'EH'
ELSE ' ' END);
q:=' select p.cliente, ';
q:=q||' p.partner, ';
q:=q||' p.channel_mgr, ';
q:=q||' p.fm_sales_rep, ';
q:=q||' p.status, ';
q:=q||' p.sc_leader, ';
q:=q||' p.sector, ';
q:=q||' p.fecha_inicio ';
q:=q||' from adminorv.proyectosongoing p ';
q:=q||' where p.sc_leader = v_usuario';
return q;
end;But I don't see why you are using dynamic SQL and a function returning a query here.
That could be done with just a simple query like this:
select p.cliente, p.partner, p.channel_mgr, p.fm_sales_rep, p.status, p.sc_leader,
       p.sector, p.fecha_inicio
  from adminorv.proyectosongoing p
where p.sc_leader = CASE WHEN :P101_USERNAME = 'janet' THEN 'JA'
                          WHEN :P101_USERNAME = 'cesar' THEN 'CC'
                          WHEN :P101_USERNAME = 'luisjavier' THEN 'LT'
                          WHEN :P101_USERNAME = 'mauricio' THEN 'MO'
                          WHEN :P101_USERNAME = 'enrique' THEN 'EH'
                          ELSE ' '
                      END

Similar Messages

  • Problem to generat an report on an SSRS for SCCM 2012 R2 SP1. I got error has occurred during report processing.

    Hi,
    Problem to generat an report on an SSRS for SCCM 2012 R2 SP1. I got error has occurred during report processing.
    In general it is no problem to generat SSRS reports, but an custom one i get issue with.
    The Error:
    An
    error has occurred during report processing. (rsProcessingAborted)
    Query
    execution failed for dataset 'DataSet1'. (rsErrorExecutingCommand)
    ExecuteReader:
    CommandText property has not been initialized

    Hi SaiTech,
    According to your description, when you render report on SCCM 2012 R2, you got the error message.
    According to my knowledge, the issue can be caused by following reasons:
    Select permission not granted to ConfigMgr reporting account. We need to open the SQL management console and open the properties dialog box of configmgr db, grant select and execute permission to ConfigMgr reporting account.
    Reporting Services Web Service URL or Report Manager is false. Make sure Web Service URL and Report Manager URL are correct. Restart SMS_Executive service and reinstall Reporting Service Point, then please render the report again.
    Report timeout. Increase query and report timeout.
    If the problem remain unresolved, please provide detailed information of SRSRP.log (default location: %programfiles%\Microsoft  and Configuration Manager\Logs) and reporting services error log(default location: %programfiles%\Microsoft SQL Server\<SQL
    Server Instance>\Reporting Services\LogFiles), it will help us move more quickly toward a solution.
    If you have any more questions, please feel free to ask.
    Thanks,
    Wendy Fu
    If you have any feedback on our support, please click
    here.
    Wendy Fu
    TechNet Community Support

  • Problems while generating the report........

    Hi Experts,
    I have genereated a new report on purchasing data, I am facing bellow problems while generating the report,
    1) In rows one Invoice doc num is there, I am not getting result row for this object, I have given NEVER in supress result rows in properties of that object, but it's not showing.....how can i get result row for this object?
    2) I am getting '#' for the blank values, How to remove these '#"s
    Please help to solve my above problems,
    Helpful answer will be awarded with points,
    Thanks in advance,
    Venkat.

    Hi,
    1) If you have only Invoice Num it does not shows the result Row .
    2)If you display the characteristics as Key u will get as '#'. You can select as Text,then it will show 'Not Assigned'. (Hope you know that when the Values not updated from Infoprovider then # appears at output )
    Hope it helps

  • Error while generating XMLP report

    Hi,
    I have generated a XML Publisher report using Application Engine (using row set).
    The process runs to NO success and the following error appears in the log file.
    xmlpublisher PTFOProcessor.generateOutput error.
    Exception:null
    Can anyone throw light on as what could be the possible reason for this error.
    xmlpublisher PTFOProcessor.generateOutput error
    Please help me on this.
    thanks in advance
    Venkat

    Hi Kumar,
    By default if a report takes more than 100 seconds to generate you will see the message you have described. In order to view this report you must go to and click the Reports button in the web client tool bar, and click on the option, "My BI Publisher Reports". From this view you will see a list of all reports you have generated. To change the default preference of 100 seconds you can find detailed info under Siebel bookshelf: [http://download.oracle.com/docs/cd/E14004_01/books/Reports/ReportsAdmin9.html#wp305847]
    -Fred

  • Wrong output for different XMLP reports

    Hi all,
    I've found an unexpected problem in our XMLP reports.
    A user called us telling that launching a report in XMLP he viewed an output concerning a set of data different from the expected.
    We investigated looking for bugs in the query or other kind of problems, without any results.
    Finally we notice that 2 or more XMLP reports completed in the same moment (I mean that the users can launch the concurrent in different moments but the output files are created in the same moment) conflicts and they produce 2 or more output file with the same data, although the input parameters are totally different (i.e. : the user launched a detailed report about the people working in his office and he unbelievably realized that the report contained the people of another office).
    Has anybody faced this kind of issue??
    Thx, all and sorry for my bad english :-(
    Ciao.

    Hi,
    I am also facing the same issue. I am also getting "????" instead of Hebrew translation. I am trying to generate PDF file using the XMLP API. It works fine when tried to generate from MS Word using the "Preview Translation" option.
    Please let me know is there any configuration parameters that need to be set.

  • Error while generating earlywatch report.

    Hi Guru's
                  I am having problem in generating earlywatch report.
    In solution manager i find these errors:-
    The data for this session is overdue. Data has not yet been transferred from the associated satellite system.
    Go to the Service Data Control Center (transaction SDCCN) in the satellite system and check why the data has not been sent.
    Typical sources of errors are:
    The RFC connection for the SAP Solution Manager system is not working.
    The 'Task Processor' background job, which collects the session data, has been changed.
    Problems arose while data was being collected (see the detail log for the task that collects the session data).
    A periodic 'SDCC Maintenance Package' task has not been scheduled to check whether your SAP Solution Manager system requests session data.
    Session number: 1000000002286
    In source system tcode sdccn when i try to run Refresh sessions i get following error:-
    31.05.2010     12:24:34      > Task rescheduled for 20100531125533 ( attempt 0001 )     /BDL/SAPLBDL11     0
    31.05.2010     12:24:34     Refresh of session overview failed from destination SM_SMPCLNT100_BACK     /BDL/SAPLBDL11     0
    31.05.2010     12:24:34      > Sessions cannot be refreshed from destination SM_SMPCLNT100_BACK ( SMP , 0020275310 )     /BDL/SAPLBDL11     0
    31.05.2010     12:24:34      > You cannot log on (CUA system assignment missing)     /BDL/SAPLBDL11     0
    31.05.2010     12:24:34      > error reading function module interface DSWP_API_SESSIONLIST_GET from  SM_SMPCLNT100_BACK     /BDL/SAPLBDL11     0
    31.05.2010     12:23:58     Refresh of session overview started from destination SM_SMPCLNT100_BACK     /BDL/SAPLBDL11     0
    I have checked with the rfc's they are working fine.
    Please help.
    Regards
    Akif

    Hi Akif,
    Could you please try deleting the RFC Connection and entering it again in the Managed system.
    1) SDCCN
    2) Goto-> Settings-> Task specific.
    3) RFC Destinations-> Settings click on change mode.
    4) Delete the RFC and then add the RFC Connection again and mark as Master and active.
    Then check it, hope it solves the issue.
    Thanks,
    Raghavendra.

  • WebLogic java process requieres 99% load after XMLP report creation

    Hi,
    we're experiencing production problems with on XMLP report which is triggered and processes completely by application package PC.
    Creation of a pdf file works fine but on the server a WebLogic java process gains 99% load until production is not usable.
    A truss on the server shows:
    ProzessID/ThreadID
    appkops@hcmprod-154 > truss -p 13912/90
    +/90:stat64("/app/848/webserv/persdb/applications/peoplesoft/PORTAL/psft/V2099893760", 0xAB3FF7D8) Err#2 ENOENT+
    +/90:stat64("/app/848/webserv/persdb/applications/peoplesoft/PORTAL/psft/V2099893760/B_EA_A_VORBL.pdf", 0xAB3FF7D8) Err#2 ENOENT+
    +/90:stat64("/app/848/webserv/persdb/applications/peoplesoft/PORTAL/psft/V2099893760", 0xAB3FF7D8) Err#2 ENOENT+
    +/90:stat64("/app/848/webserv/persdb/applications/peoplesoft/PORTAL/psft/V2099893760/B_EA_A_VORBL.pdf", 0xAB3FF7D8) Err#2 ENOENT+
    +/90:stat64("/app/848/webserv/persdb/applications/peoplesoft/PORTAL/psft/V2099893760", 0xAB3FF7D8) Err#2 ENOENT+
    +/90:stat64("/app/848/webserv/persdb/applications/peoplesoft/PORTAL/psft/V2099893760/B_EA_A_VORBL.pdf", 0xAB3FF7D8) Err#2 ENOENT+
    and so on...
    The application package PC looks as follows:
    import PSXP_RPTDEFNMANAGER:ReportDefn;
    Local PSXP_RPTDEFNMANAGER:ReportDefn &Vorblatt = create PSXP_RPTDEFNMANAGER:ReportDefn("B_EA_A_VORBL");
    Local string &sXML;
    +&sXML = GetHTMLText(HTML.B_EA_BARCODE, PERSON.EMPLID, PERSON_NAME.NAME);+
    +&Vorblatt.Get();+
    +&Vorblatt.SetRuntimeDataXMLDoc(CreateXmlDoc(&sXML));+
    +&Vorblatt.ProcessReport("", "", %Date, "");+
    CommitWork();
    +&Vorblatt.DisplayOutput();+
    CommitWork();
    +&Vorblatt.DisplayOutput();+
    So it looks as if the server process tries to delete a directory and output file which are no longer there?!?
    Does anyone see a problem with the above PC or the solution in general?
    Any help is very appreciated.
    Thanks
    Ralf
    Edited by: clausthaler on 05.01.2011 02:59

    What happends if you try to issue your query from a SQL prompt? Does it work? Now, what is it written at the alert.log at the time this error arises? Is this version certified against 10g?
    There are some issues when connecting the jdbc driver with Oracle 10g (http://edocs.bea.com/wls/docs81/notes/issues.html#129571) some patches may need to be applied.

  • Problem Generating a Report by passing a Resultset as a datasource

    I am having troubles generating a report using CR for Eclipse 2.0.
    I used the example that shows how do a simple select SQL query to the database and pass the resultset from the query to the report to generate a report from here: https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/201084dc-be66-2b10-64bf-dde4970c9b90
    I used a simple rpt file that simply shows the content of two columns from a table: TXN_TYPE_CD and TXN_STATUS_CD from a POLICY_TXN table.
    Using the code above, and just modifying it a bit to include my jdbc connection details as well as my select query, I was able to view the report which populated data from my database (Oracle 10g) at runtime of the application.  This test proved positive.
    However, the problem I am having is that I am trying to make this code into a Servlet for use in a Java EE application running on Websphere 6.1.0.17 using JVM 1.5.0_15  64-bit.  Instead of using the DHTML thick client, I export to PDF.  When I do this, the crystal report shows as a PDF, but the data is missing for some reason.  Only the headers for the two db columns are shown.  I don't see any startling differences between the code and am 100% positive that my resultset is being returned with data (I output the data returned in the result set as shown in the code).
    Here is the code I am using:
    public class CrystalReportGeneratorServlet_WOW extends Servlet {
         private static final long serialVersionUID = 768970549082466125L;
         protected HttpSession session;
         private final String EXPORT_FILE = "myExportedReport.pdf";
         private final String CUSTOM_PATH = "/custom/resource/crystalReport/";
         private String REPORT_NAME;
         public void service(HttpServletRequest request, HttpServletResponse response)
                   throws IOException, ServletException {
              Properties loParms = new Properties();
              ResultSet resultSet = null;
              //Obtain current JDBC Connection
              Connection loConn = AppEnvironment.getJDBCConnection();
              Statement statement = null;
              try {
                   REPORT_NAME = "Test.rpt";
                   //Open report
                   ReportClientDocument reportClientDoc = new ReportClientDocument();
                   reportClientDoc.open(SystemConfig.getAppHome() + CUSTOM_PATH + REPORT_NAME, 0);
                   //Create SQL query.    
                   String query = "SELECT \"POLICY_TXN\".\"TXN_TYPE_CD\", \"POLICY_TXN\".\"TXN_STATUS_CD\"" + "FROM   \"POLICY_TXN\"";
                   //Query database and obtain the Resultset that will be pushed into the report.  
                   statement = loConn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
                   //Execute query and return result set.
                   resultSet = statement.executeQuery(query);
                   //Look up existing table in the report to set the datasource for and obtain its alias.  This table must
                   //have the same schema as the Resultset that is being pushed in at runtime.  The table could be created
                   //from a Field Definition File, a Command Object, or regular database table.  As long the Resultset
                   //schema has the same field names and types, then the Resultset can be used as the datasource for the table.
                   String tableAlias = reportClientDoc.getDatabaseController().getDatabase().getTables().getTable(0).getAlias();
                   /////TESTING: OUTPUT contents of resultSet
                   while (resultSet.next()) {
                        System.out.println("TXN_STATUS_CD = " + resultSet.getString("TXN_STATUS_CD"));
                        System.out.println("TXN_TYPE_CD = " + resultSet.getString("TXN_TYPE_CD"));
                   //Push the Java ResultSet into the report.  This will then be the datasource of the report.
                   DatabaseController dbc = reportClientDoc.getDatabaseController();
                   dbc.setDataSource(resultSet, tableAlias , "resultsetTable");
                   //Export to PDF
                   ExportToPDF(reportClientDoc, response);
              catch(ReportSDKException ex) {     
                   System.out.println(ex);
              catch(Exception ex) {
                   System.out.println(ex);               
              } finally {
                   try {
                        resultSet.close();
                   } catch (SQLException e) {
                             e.printStackTrace();
                        } finally {
                             AppEnvironment.returnStatement(statement);
                             AppEnvironment.returnConnection ( loConn ) ;
         private void ExportToPDF(ReportClientDocument rcd, HttpServletResponse response)
              try {
                   ByteArrayInputStream byteArrayInputStream = (ByteArrayInputStream)rcd.getPrintOutputController().export(ReportExportFormat.PDF);
                   rcd.close();
                   writeToBrowser(byteArrayInputStream, response, "application/pdf", EXPORT_FILE);
              catch(ReportSDKException ex) {
                   System.out.println(ex);
              catch(Exception ex) {
                   System.out.println(ex);
         * Utility method that demonstrates how to write an input stream to the server's local file system.
         private void writeToBrowser(ByteArrayInputStream byteArrayInputStream, HttpServletResponse response, String mimetype, String exportFile) throws Exception {
              //Create a byte[] the same size as the exported ByteArrayInputStream.
              byte[] buffer = new byte[byteArrayInputStream.available()];
              int bytesRead = 0;
              try{
                   //Set response headers to indicate mime type and inline file.
                   response.setHeader("Content-disposition", "inline;filename=" + exportFile);
                   response.setContentType(mimetype);
                   //Stream the byte array to the client.
                   while((bytesRead = byteArrayInputStream.read(buffer)) != -1) {
                   response.getOutputStream().write(buffer, 0, bytesRead);
                   //Flush and close the output stream.
                   response.getOutputStream().flush();
                   response.getOutputStream().close();
              } catch (Exception e){
                        e.printStackTrace();
         public static Servlet getInstance()
            return new CrystalReportGeneratorServlet_WOW();
    Any help would greatly be appreciated.

    Actually Uzair I came across this thread in trying to find a resolution to my problem.  I was wondering if you were able to resolve this issue as it appears as though I may have the same problem.
    Thanks.

  • Problem in generating oracle 10g reports to rtf Template? (Emergency)

    Hi Team,
    I had a problem in generating rdf to rtf template.. I had an rdf template with place holders like this
    Hi i "Employee" <Empno> and my salary is <Empsal>
    but after the generation by using BIBatchConversion , i am getting partial rtf file like this
    Hi i "Employee"
    i am not getting the rest of the design... do i need to overwrite the rtf manually or do we have any other conversion process when we are using placeholders in rdf reports...
    Regards
    Bhu1

    hi...i already done what u had suggested but the error still come up.
    DECLARE
         RO_Report_ID REPORT_OBJECT;
         Str_Report_Server_Job VARCHAR2(100);
         Str_Job_ID VARCHAR2(100);
         Str_URL VARCHAR2(100);
         PL_ID PARAMLIST ;
    BEGIN
         PL_ID := GET_PARAMETER_LIST('TEMPDATA');
         IF NOT ID_NULL(PL_ID) THEN
              PAUSE;
    DESTROY_PARAMETER_LIST(PL_ID);
         END IF;
         PL_ID := CREATE_PARAMETER_LIST('TEMPDATA');
         RO_Report_ID := FIND_REPORT_OBJECT('REPORT_OBJ');
         ADD_PARAMETER(PL_ID, 's_sin_no', TEXT_PARAMETER,:scrap_delivery_request.sin_no);
              SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_FILENAME, 'C:\New Forms\REF_SF_510.rdf');
              SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_COMM_MODE, SYNCHRONOUS);
              SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_EXECUTION_MODE, BATCH);
              SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESTYPE, FILE);
              SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_DESFORMAT, 'PDF');
              SET_REPORT_OBJECT_PROPERTY(RO_Report_ID, REPORT_SERVER, 'rep_edmund.main');
              Str_Report_Server_Job := RUN_REPORT_OBJECT(RO_Report_ID, PL_ID);
              Str_Job_ID := SUBSTR(Str_Report_Server_Job, LENGTH('rep_edmund.main') + 2, LENGTH(Str_Report_Server_Job));
              Str_URL      := '/reports/rwservlet/getjobid' || Str_Job_ID || '?server=' || 'rep_edmund.main';
              WEB.SHOW_DOCUMENT(Str_URL, '_SELF');
              DESTROY_PARAMETER_LIST(PL_ID);
    END;
    Edited by: baguhan on Jul 4, 2009 12:59 AM

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

  • Error while using the XMLP API to generate a report

    Hi all,
    I am trying to generate a report using stand-alone application by the JAVA API (User doc Ch 11). I am using RFT template for this.
    Step1: Create XSL from RTF file. I could do this. Example is given in page 262 of the guide. Here is the code snippet (all import, try/catch removed):
    RTFProcessor rtfProcessor = new RTFProcessor(args[0]);
    rtfProcessor.setOutput(args[1]); // output file
    rtfProcessor.process();
    This generated a XSL file correctly.
    Step 2: Using the XSL and XML file, it could generate a output. This is failing for me. (Page 265). Code snippet below:
    <snippet>
    FOProcessor processor = new FOProcessor();
    processor.setData(args[0]); // set XML input file
    processor.setTemplate(args[1]); // set XSL input file
    processor.setOutput(args[2]); //set output file
    processor.setOutputFormat(FOProcessor.FORMAT_PDF);
    // Start processing
    try
    processor.generate();
    catch (XDOException e)
    e.printStackTrace();
    System.exit(1);
    System.exit(0);
    </snippet>
    It compiles. When I run this program (class), I get the following errors and I do not know where to look for help/resolution:
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 2
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 3
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 4
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 5
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 6
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: label missing for column index 7
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 1 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 2 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 3 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 4 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 5 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 6 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 7 at row index 0
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 1 at row index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 2 at row index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 3 at row index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 4 at row index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 5 at row index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 6 at row index 1
    PROBLEM: In oracle.dss.graph.Graph::createLocalGridDataSource: missing data for column index 7 at row index 1
    PROBLEM: In oracle.dss.graph.GraphControllerAdapter::public void perspectiveEvent( TDGEvent event ): inappropriate data: partial data is null

    Hi Tim,
    My present requirement is :
    In OAF page, When i click "generate" button, it should generate pdf which is XML publisher output.
    My code is able to generate pdf/excel file with zero bytes and also i'm unable to open this pdf file. Following code i have written in processFormRequest:
    I debugged this code . it's working fine till processor.setOutputFormat(FOProcessor.FORMAT_EXCEL); It's unable to execute the FO processor Engine.
    Kindly please help me to rectify this error.
    if (pageContext.getParameter ("GeneratePDF")!= null)
    try{  
    RTFProcessor rtf = new RTFProcessor("C:\\cash_receipt\\CASH_RECEIPT_XML5.rtf");
    System.out.println(" step -2");
    rtf.setOutput("C:\\cash_receipt\\CASH_RECEIPT_XML7.xsl"); // set output AS XSL FILE
    System.out.println(" step -1");
    Document dc = rtf.process();
    System.out.println(" rtf.process()" + dc.toString());
    FOProcessor processor = new FOProcessor();
    // set the data definition
    processor.setData("C:\\cash_receipt\\cash_receipt_xml5.xml");
    System.out.println(" step 1");
    //("C:\\cash_receipt\\cash_receipt_xml5.xml");
    // set the template
    processor.setTemplate("C:\\cash_receipt\\CASH_RECEIPT_XML7.xsl");
    System.out.println(" step 2");
    //("C:\\cash_receipt\\CASH_RECEIPT_XML5.xsl");
    //Set the output file and the output format for a PDF document:
    processor.setOutput("C:\\TestXML.Excel");
    System.out.println(" step 3");
    processor.setOutputFormat(FOProcessor.FORMAT_EXCEL);
    // run the FO processor Engine
    System.out.println(" step 4");
    processor.generate();
    System.out.println(" step 5");
    catch (Exception e) {
    e.printStackTrace();
    System.out.println("XDOException " + e.getMessage());
    thanks,
    Keshav

  • Problem to generate report

    i have prob to report generate(like a VB data report).Actually wht i want is to generate a report and to have a preview of the same and print also.If possible do sent me some code related to this problem or give me idea whwre i can get it.
    Thanks
    sandeep

    This error is produced in the JDeveloper. It may be the xalan.jar cause this problem. But, I don't know how to replace the library.

  • Problem in generating User Login Report on System Usage

    We want a daily shift-wise(3 shifts of 8 hours each) report with following information
    1.  User-ID
    2.  Login Time-Stamp
    3.  Transaction Code
    4.  Transaction Code Start Time-Stamp
    5.  Transaction Code End Time-Stamp
    6.  Logout Time-Stamp
    At present we are extracting the usage data with STAD transaction & processing in batch mode to generate a report which is not fulfilling our requirement as it is not having Transaction Code End Time-Stamp. One problem is same transaction code is having multiple Time-Stamps.  If  time-stamp is considered up to hour & minute,  multiple records for same transaction code as well as different transaction codes are appearing. We are unable to generate MIS as per our requirement.
    Thanks in advance.
    Kajal

    Hi,
    This may be possible if the trace is activated in the TA ST01. But it is not advisable to keep this trace for a prolonged period as it has an adverse effect in the system performance.
    For a smaller user base, u can enable the security log in TA SM19, The report can be pulled from TA SM20.
    Hope this helps.
    Regards,
    Varadharajan M

  • Problem in Generating the Infoset report(two ODS joining)

    I am facing the problem in ODS infoset report.
    Consider the two ODS (ie ODS1,ODS2)
    <b>ODS A</b>
    <b>A     B     Sal1(KF1)</b>
    1     10    10,000
    2     10     20,000
    Here A is the Keyfield of ODS A (all A,B, Sal1 are infoobjects).
    <b>ODS B</b>
    <b>B    Sal2(KF2)</b>
    10 4000
    Here B is the Keyfield of ODS B.
    I have  joined two ODS using Infoset.
    Joining condition: OSD A(charactersitics B ie value 10) joined with Keyfield of ODS B(ie B value 10)
    While exectuing the Report i am getting the following output.
    B   Sal1   <b>Sal2</b>
    10 30,000  8000(wrong data)
    Sal2 is summed twice since in ODS A it is having 2 records.
    My requirement is i wnat O/P as
    <b>B   Sal1   Sal2</b>
    10 30,000  4000
    With regards,
    Hari.
    +919323839017

    If you create a multiprovider with the two ODS you won’t have this problem.
    Hope it helps.
    Regards.

  • AR Invoice XMLP Report does not show as pdf in email Attachment

    Hi,
    I have developed a AR Invoice Report using XMLP. My requirement is to generate the output in pdf and also send the file as an attachment
    to the recipient email address with specified subject and body.
    I have developed the xmlp report rtf template and the report.rdf such that
    After report in report.rdf :
    function AfterReport return boolean is
    v_conc_request_id NUMBER;
    p_email_address VARCHAR2(100);
    v_set_layout_option boolean;
    BEGIN
         v_set_layout_option := fnd_request.add_layout('APPLN SHORT NAME','PROG_SHORT_NAME for report file','EN','US','PDF');
         IF (NOT v_set_layout_option) THEN
         srw.message( 10001,'Unable to apply template');
         ELSE      
              srw.message( 10001,'template applied');
    v_conc_request_id := FND_REQUEST.SUBMIT_REQUEST( application => 'APPLN SHORT NAME',
    program => 'PROG_SHORT_NAME for prog file',
                             description => NULL,
                                  start_time => TO_CHAR(SYSDATE, 'DD-MON-YY HH:MI:SS'),
                                  sub_request => FALSE,
                                  argument1 => :p_email_address,
                                  argument2 => :P_CONC_REQUEST_ID,
                                  argument3 => NULL,
                                  argument4 => NULL .... upto argument100                                                                                               );
    END IF;
    commit;
    return (TRUE);
    SRW.MESSAGE (10001,'CONC REQ ID:' ||v_conc_request_id );
    SRW.MESSAGE (10001,'Email Address:' ||p_email_address );
    srw.user_exit( 'FND SRWEXIT' );
    end;
    The FND_REQUEST.SUBMIT_REQUEST will call another Host program which will send an email with the specified Body and Subject.
    The report pdf output will be an attachment along with the email.
    Issues faced
    When I click on the Report Concurrent Program output, I can see the XMLP pdf output, but when the pdf file comes to my email address, it does not open,
    because, it is actually an xml file with the extension of pdf.
    I am actually picking up the file output from fnd_concurrent_requests. When I check the file it is xml, but in the conc manager it opens as a pdf,
    Is there a way by which I can pick up the pdf file and not the xml file. Is there any other location where this pdf file gets stored, which I see in the Conc manager output window, but not in the fnd_concurrent_requests table.
    I also notice that the pdf file gets generated in the Conc manager output window, irrespective of whether or not I use the code for
    fnd_request.add_layout.
    But when I use : fnd_request.add_layout, the Host program ends with a Warning, whereas if I don''t use it, then it completes successfully.
    But still the problem of the attachment persists.
    Warning
    ------------- 1) PUBLISH -------------
    Beginning post-processing of request 435302 on node NACRTCDELL005 at 31-OCT-2008 11:37:12.
    Post-processing of request 435302 failed at 31-OCT-2008 11:37:12 with the error message:
    One or more post-processing actions failed. Consult the OPP service log for details.
    ------------- 2) PRINT   -------------
    Not printing the output of this request because post-processing failed.
    Finished executing request completion options.
    Concurrent request completed
    Current system time is 31-OCT-2008 11:37:12
    Can someone please respond to this issue asap, the requirement is very critical.
    Thanks to all

    1. Bursting: You need to call the standard bursting program in the after report trigger, request id is the parameter,
    function AfterReport return boolean is
    G_REQUEST_ID number;
    begin
         G_REQUEST_ID := fnd_request.submit_request('XDO',
    'XDOBURSTREP',
    'XML Publisher Report Bursting Program',
    SYSDATE,
    FALSE,
    :P_CONC_REQUEST_ID,
    NULL,
                   Null,
                   Null,
                   Null,
                   NULL,
                   NULL,
                   NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,
                   NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
    COMMIT;
    SRW.USER_EXIT('FND SRWEXIT');
    return (TRUE);
    Exception
    when others then return true;
    end;
    You need to create Bursting control file (.xml) and upload in the data definitions. If you want only one file as attachment, (<xapi:request select="/MODULE1/LIST_G_EMPNO/G_EMPNO"> here reduce the tree length) so only one file will be send as an email.
    <?xml version="1.0" encoding="UTF-8"?>
    <xapi:requestset xmlns:xapi="http://xmlns.oracle.com/oxp/xapi" type ="bursting">
    <xapi:request select="/MODULE1/LIST_G_EMPNO/G_EMPNO">
    <xapi:delivery>
    <xapi:email id ="123" server="smtp_serverl.net" port="25"
    from="[email protected]" reply-to="[email protected]">
    <xapi:message id="123" to="[email protected]" cc="" attachment="true"
    content-type="text/html" subject="Purchase Order Number: ${EMPNO}">Please
    see attached Purchase Order File: ${EMPNO}</xapi:message>
    </xapi:email>
    </xapi:delivery>
    <xapi:document output="PO_${EMPNO}" output-type="pdf" delivery="123">
    <xapi:template type="rtf" location="xdo://CUS.TEST_BURST_1.en.US/?getSource=true"
    filter=""></xapi:template>
    </xapi:document>
    </xapi:request>
    </xapi:requestset>
    2. another way is,
    in your after report trigger, call another program. In that program, wait until your original program completes. After it is done, get the path and PDF file name, call your host program, passing the PDF file name as parameter. You need to modify your host program, a bit.

Maybe you are looking for

  • How to decide when an a "wait for event action" is activated

    Hi, In the attched example file (which is a part of my program)I have 3 basic stages, enclosed in a sequence structure: 1) I initialize the GUI buttons 2) I check the instruments in my system are opened and ready to run ("VSWR initialize vi")and issu

  • Can't close windows and palettes created in a script (CC)

    Hi, I developped a Script for After Effects, and sometimes I need to show a window or a palette, but when this window is showed more than once, it can't be closed again (the close button, the one with the cross on the title bar) does nothing, whether

  • To find BOM from a closed Planned Order in REM process.

    Hi, Pl. let me know how to find Planned order no. and its BOM which has been closed? In mb51 we get only Order no. which is not the pld ord and we cannot get the bom. pl. help.

  • Sharepoint 2010 july 2014 cu

    Hi I just installed July 2014 cu on my share point 2010 farm . According to the lists available on the internet the build version for this cu is 14.0.7128.5001 after installation and executing the psconfig wizard in my central administration  the Con

  • Error while running XL Reporter (Cause: MetaInfo.xml not found!)

    Unable to connect to XL Reporter Error! Server communicawtion failed! Cause: MetaInfo.xml not found! (Please contact the administrator to fix the repositor connection)