0 Replies Latest reply: Sep 18, 2007 6:52 AM by 564634 RSS

    Run a ora9ids .JSP report using browser

    564634
      Please help .................

      I have created a report in Ora9ids and
      created a web layout and saved as JSP.
      I tried to run report using 2 parameters
      and run on the browser. The code used given
      below. When run errors occured.as shown below.
      Kindly suggest the solution./



      ----.JSP Code to run Ora9ids Report .JSP_________

      <%@ page language="java" import="java.sql.*" %>
      <HTML>
      <HEAD> <TITLE> The JDBCQuery JSP </TITLE> </HEAD>
      <BODY BGCOLOR="white">
      <B> <%= runQuery() %> </B> //<HR><BR>

      //<B>Enter a search condition:</B>

      <FORM METHOD="post" ACTION="/examples/testjsp/pslip.jsp">

      <font size=5> Month <input type=text Month="Enter Month" size=20>
                </font>
                <br>
                <font size=5> PF Number <input type=text PF No.="Enter PF Number:"

      size=20>
                </font>
                <br>
                <input type=submit name=action value="Submit">

      </FORM>
      </BODY>
      </HTML>

      <%-- Declare and define the runQuery() method. --%>
      <%! private String runQuery() throws SQLException {
      Connection conn = null;
      try {
      DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
      conn = DriverManager.getConnection("jdbc:oracle:oci8:@rdso","guest", "guest");
      return ("Complied") ;
      } catch (SQLException e) {
      return ("<P> SQL error: <PRE> " + e + " </PRE> </P>\n");
      } finally {

      if (conn!= null) conn.close();
      }

      }
      %>



      ---------The Code that web source created by .JSP_____________


      <%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
      <%@ page language="java" import="java.io.*" errorPage="/rwerror.jsp" session="false" %>
      <!--
      <rw:report id="report">
      <rw:objects id="objects">
      </rw:objects>
      -->

      <HTML>
      <HEAD>
      <rw:style id="rwpeach">
      <link rel="StyleSheet" type="text/css" href="css/rwpeach.css">
      </rw:style>

      <TITLE> Your Title </TITLE>
      <META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>

      <BODY bgColor=#ffffff link=#000000 vLink=#000000>
      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
      <TBODY>
      <TR>
      <TD bgColor=#ffffff rowSpan=2 vAlign=center width=188>
      <p><IMG src="images/rwpeach_logo.gif" width="135" height="36"><br>
      </p>
      </TD>
      <TD bgColor=#ffffff height=40 vAlign=top><IMG alt="" height=1

      src="images/stretch.gif" width=5></TD>
      <TD align=right bgColor=#ffffff vAlign=bottom>  </TD>
      </TR></TBODY></TABLE>
      <TABLE bgColor=#ff0000 border=0 cellPadding=0 cellSpacing=0 width="100%">
      <TBODY>
      <TR>
      <TD class="OraColumnHeader">  </TD>
      </TR></TBODY></TABLE>
      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
      <TBODY>
      <TR>
      <TD bgColor=#ff0000 vAlign=top class="OraColumnHeader"><IMG alt="" border=0

      height=17 src="images/topcurl.gif" width=30></TD>
      <TD vAlign=top width="100%">
      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
      <TBODY>
      <TR>
      <TD bgColor=#000000 height=1><IMG alt="" border=0 height=1

      src="images/stretch.gif" width=1></TD>
      </TR>
      <TR>
      <TD bgColor=#9a9c9a height=1><IMG alt="" border=0 height=1

      src="images/stretch.gif" width=1></TD>
      </TR>
      <TR>
      <TD bgColor=#b3b4b3 height=1><IMG alt="" border=0 height=1

      src="images/stretch.gif" width=1></TD>
      </TR>
      </TBODY>
      </TABLE>
      </TD>
      </TR>
      </TBODY>
      </TABLE>
      <TABLE width="100%" border="0" cellspacing="0" cellpadding="0">
      <TR>
      <TD width="29%" valign="top">
      <TABLE width="77%" border="0" cellspacing="0" cellpadding="0">
      <TR>
      <TD width="10%" class="OraCellText"><IMG src="images/peach_d_arrow.gif"

      width="10" height="10"></TD>
      <TD width="90%" class="OraCellText">Navigation goes here </TD>
      </TR>
      <TR>
      <TD width="10%" class="OraCellText"><IMG src="images/peach_r_arrow.gif"

      width="10" height="10"></TD>
      <TD width="90%" class="OraCellText">Navigation Item</TD>
      </TR>
      </TABLE>
      </TD>
      <TD width="71%">
      <DIV align="center">
           <!-- Data Area Generated by Reports Developer -->
      <rw:dataArea id="MGBANKACNOGRPFR">
      <rw:foreach id="R_G_BANK_AC_NO_1" src="G_BANK_AC_NO">
      <table class="OraTable">
      <caption class="OraHeader"> final test salary report <br>AU : <rw:field id="F_AU_CODE"

      src="AU_CODE" breakLevel="R_G_BANK_AC_NO_1" breakValue=" "> F_AU_CODE

      </rw:field><br>
      Scale: <rw:field id="F_SCALE_DESC" src="SCALE_DESC" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_SCALE_DESC </rw:field><br>
      Leave Days <rw:field id="F_LEAVE_DAYS" src="LEAVE_DAYS" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_LEAVE_DAYS </rw:field><br>
      LAP: <rw:field id="F_LAP" src="LAP" breakLevel="R_G_BANK_AC_NO_1" breakValue=" ">

      F_LAP </rw:field><br>
      LHAP: <rw:field id="F_LHAP" src="LHAP" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_LHAP </rw:field><br>
      A/c No : <rw:field id="F_ACCOUNT_NO" src="ACCOUNT_NO" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_ACCOUNT_NO </rw:field><br>
      Next Increment due: <rw:field id="F_OFF_DT_NEXT_INCR" src="OFF_DT_NEXT_INCR"

      breakLevel="R_G_BANK_AC_NO_1" breakValue=" "> F_OFF_DT_NEXT_INCR </rw:field><br>
      Name <rw:field id="F_EMP_NAME" src="EMP_NAME" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_EMP_NAME </rw:field><br>
      Qtr No : <rw:field id="F_QTR_NO" src="QTR_NO" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_QTR_NO </rw:field><br>
      Designation : <rw:field id="F_DESIG_DESC" src="DESIG_DESC"

      breakLevel="R_G_BANK_AC_NO_1" breakValue=" "> F_DESIG_DESC </rw:field><br>
      BU : <rw:field id="F_BU_CODE" src="BU_CODE" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_BU_CODE </rw:field><br>
      PF No : <rw:field id="F_PF_NO" src="PF_NO" breakLevel="R_G_BANK_AC_NO_1"

      breakValue=" "> F_PF_NO </rw:field><br>
      Father Name: <rw:field id="F_EMP_FATHER_NAME" src="EMP_FATHER_NAME"

      breakLevel="R_G_BANK_AC_NO_1" breakValue=" "> F_EMP_FATHER_NAME </rw:field><br>
      </caption>
      <tr>
      <td valign="top">
      <rw:foreach id="R_G_TRANS_TYPE_1" src="G_TRANS_TYPE">
      <table class="OraTable">
      <tr>
      <th class="OraHeader"> Trans Type <rw:field id="F_TRANS_TYPE" src="TRANS_TYPE"

      breakLevel="R_G_TRANS_TYPE_1" breakValue=" "> F_TRANS_TYPE </rw:field></th>
      <th class="OraHeader"> Cp 1 <rw:field id="F_CP_1" src="CP_1"

      breakLevel="R_G_TRANS_TYPE_1" breakValue=" "> F_CP_1 </rw:field></th>
      </tr>
      <tr>
      <td valign="top" colspan="2">
      <table class="OraTable" summary="final test salary report">
      <!-- Header -->
      <thead>
      <tr>
      <th <rw:id id="HBCS2" asArray="no"/> class="OraColumnHeader"> Slno. </th>
      <th <rw:id id="HBTRANSCODE" asArray="no"/> class="OraColumnHeader"> Trans

      Code </th>
      <th <rw:id id="HBTRANSDESC" asArray="no"/> class="OraColumnHeader"> Trans

      Description </th>
      <th <rw:id id="HBAMOUNT" asArray="no"/> class="OraColumnHeader"> Amount

      </th>
      <th <rw:id id="HBCF1" asArray="no"/> class="OraColumnHeader"> Cf 1 </th>
      </tr>
      </thead>
      <!-- Body -->
      <tbody>
      <rw:foreach id="R_G_TRANS_CODE_1" src="G_TRANS_CODE">
      <tr>
      <td <rw:headers id="HFCS2" src="HBCS2"/> class="OraCellNumber"><rw:field

      id="F_CS_2" src="CS_2" nullValue=" "> F_CS_2 </rw:field></td>
      <td <rw:headers id="HFTRANSCODE" src="HBTRANSCODE"/>

      class="OraCellNumber"><rw:field id="F_TRANS_CODE" src="TRANS_CODE" nullValue=" ">

      F_TRANS_CODE </rw:field></td>
      <td <rw:headers id="HFTRANSDESC" src="HBTRANSDESC"/>

      class="OraCellText"><rw:field id="F_TRANS_DESC" src="TRANS_DESC" nullValue=" ">

      F_TRANS_DESC </rw:field></td>
      <td <rw:headers id="HFAMOUNT" src="HBAMOUNT"/>

      class="OraCellNumber"><rw:field id="F_AMOUNT" src="AMOUNT" nullValue=" "> F_AMOUNT

      </rw:field></td>
      <td <rw:headers id="HFCF1" src="HBCF1"/> class="OraCellNumber"><rw:field

      id="F_CF_1" src="CF_1" nullValue=" "> F_CF_1 </rw:field></td>
      </tr>
      </rw:foreach>
      </tbody>
      <tr>
      <th class="OraTotalText">   </th>
      <th class="OraTotalText">   </th>
      <th class="OraTotalText">   </th>
      <th class="OraTotalText">   </th>
      <th class="OraTotalText">   </th>
      <td <rw:headers id="HFCS1" src="HBAMOUNT"/> class="OraTotalNumber">Cs 1

      <rw:field id="F_CS_1" src="CS_1" nullValue=" "> F_CS_1 </rw:field></td>
      <th class="OraTotalText">   </th>
      </tr>
      <tr>
      </tr>
      </table>
      </td>
      </tr>
      </table>
      </rw:foreach>
      <table class="OraTable" summary="final test salary report">
      </table>
      </td>
      </tr>
      </table>
      </rw:foreach>
      <table class="OraTable" summary="final test salary report">
      <tr>
      <th class="OraTotalNumber"> Cp 2 <rw:field id="F_CP_2" src="CP_2" nullValue=" ">

      F_CP_2 </rw:field></th>
      <th class="OraTotalNumber"> Cp 3 <rw:field id="F_CP_3" src="CP_3" nullValue=" ">

      F_CP_3 </rw:field></th>
      <th class="OraTotalNumber"> Cp 4 <rw:field id="F_CP_4" src="CP_4" nullValue=" ">

      F_CP_4 </rw:field></th>
      <th class="OraTotalNumber"> Cp 5 <rw:field id="F_CP_5" src="CP_5" nullValue=" ">

      F_CP_5 </rw:field></th>
      <th class="OraTotalNumber"> Cp 6 <rw:field id="F_CP_6" src="CP_6" nullValue=" ">

      F_CP_6 </rw:field></th>
      <th class="OraTotalNumber"> Total: <rw:field id="F_SumAMOUNTPerReport"

      src="SumAMOUNTPerReport" nullValue=" "> F_SumAMOUNTPerReport </rw:field></th>
      </tr>
      </table>
      </rw:dataArea> <!-- id="MGBANKACNOGRPFR" -->
      <!-- End of Data Area Generated by Reports Developer -->

           </DIV>
      </TD>
      </TR>
      </TABLE>
      <P><BR>
      </P>
      <TD align=middle vAlign=top width="100%"> </TD>
      <TABLE border=0 cellPadding=0 cellSpacing=0 width="100%">
      <TBODY>
      <TR>
      <TD bgColor=#000000 colSpan=2><IMG alt=" " border=0 height=1

      src="images/stretch.gif" width=1></TD>
      </TR>
      <TR>
      <TD bgColor=#ff0000 colSpan=2 class="OraColumnHeader"><IMG alt=" " border=0

      height=4 src="images/stretch.gif" width=1></TD>
      </TR>
      <TR>
      <TD bgColor=#000000 colSpan=2><IMG alt=" " border=0 height=1

      src="images/stretch.gif" width=1></TD>
      </TR>
      <TR>
      <TD bgColor=#ffffff> </TD>
      <TD align=right bgColor=#ffffff> </TD>
      </TR>
      </TBODY>
      </TABLE>
      <p> </p>
      </BODY>
      </HTML>
      <!--
      </rw:report>
      -->


      _______________________********************____________________________________





      Reports created Error Page after run :

      Tue Sep 18 15:36:17 IST 2007
      javax.servlet.jsp.JspException: rwlib-1: REP-6104: Invalid XML report definition.
      javax.servlet.jsp.JspException: rwlib-1: REP-6104: Invalid XML report definition.
           at oracle.reports.jsp.ObjectsTag.doEndTag(ObjectsTag.java:180)
           at examples.testjsp._pslip._jspService(_pslip.java:79)
           at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
           at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:302)
           at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:407)
           at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:330)
           at javax.servlet.http.HttpServlet.service(HttpServlet.java:336)
           at

      com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:59)
           at oracle.security.jazn.oc4j.JAZNFilter.doFilter(JAZNFilter.java:283)
           at

      com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:

      523)
           at

      com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatc

      her.java:269)
           at

      com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:735)
           at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:243)
           at com.evermind.util.ThreadPoolThread.run(ThreadPoolThread.java:64)