giggles7840
IS-IT--Management
I have a crystal report that is pulling data from a stored proc. i need to publish the rpt file using jsp. i can get the report to pull up but there is no data. its as if jso is not seeing the odbc connection or my parameter. i know very little about jsp and could use some help.
below are my jsp pages.. there are two one pulls the parameters and the other fires the rpt.
parameter code:
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="javax.sql.DataSource" %>
<%@ page import="org.jdom.*" %>
<%@ page import="com.maincontrol.rp.beans.*" %>
<%@ page import="com.maincontrol.rp.query.*" %>
<%@ taglib uri="/WEB-INF/dbtags.tld" prefix="dbtags" %>
<%
// CostCenterReport.jsp - Version 1.00 - 01/29/2002 17:47
// Fetch the db.query.vreport.costcenter attribute from the db-statements application scope!
Document dbStatements = (Document)application.getAttribute("db-statements"
Vector hlq1Vector = (Vector)application.getAttribute("list-tables-hlq1"
Vector hlq2Vector = (Vector)application.getAttribute("list-tables-hlq2"
User currentUser = (User)session.getAttribute("user"
HLQDualSet hlqSet = (HLQDualSet)currentUser.getOptions().get("hlqSet"
SimpleXMLPreQuery prequery = new SimpleXMLPreQuery(dbStatements, "preQuery", "db.query.vreport.costcenter"
String queryString1 = prequery.generateQualifiedPreQuery(hlq1Vector, hlq2Vector, hlqSet);
// Prepare a holding String field...
String parmValue;
%>
<HTML>
<HEAD>
<title>Cost Center Report</title>
<link rel="stylesheet" href="rportal-main.css">
</HEAD>
<BODY>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="portlettitlebox" align="left" valign="top">
<div align="right">Cost Center Report</div>
</td>
</tr>
</table>
<br>
<form name="form1" method="post" action="C_Rep_CostCenterReportFire.jsp">
<p>Enter A Cost Center parameter for the Cost Center Report:</p>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>
<div align="right">Cost Center :</div>
</td>
<td>
<div align="left">
<input type="text" name="name" maxlength="30" size="30" value="">
</td>
</tr>
</div>
</td>
</tr>
<tr>
<td>
<div align="right">
<input type="submit" name="Submit" value="Submit">
</div>
</td>
<td>
<div align="left">
<input type="reset" name="Reset" value="Reset">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
</BODY>
</HTML>
Fire code:
<!-- Version 1.00 - 01/29/2002 12:04 -->
<%@ page language="java" %>
<%@ page import="com.maincontrol.rp.admin.*" %>
<%@ page import="com.maincontrol.rp.beans.*" %>
<%@ page import="com.maincontrol.rp.query.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ include file="FireFragmentA.lssi" %>
<title>Cost Center Report (Fire!)</title>
<%@ include file="FireFragmentB.lssi" %>
<%
String prompt0 = (String)request.getParameter("prompt0"
%>
<%
String table = "KOMP";
String view = "XREP_KOMP_BY_ACQ_MODE";
%>
<%@ include file="FireFragmentC.lssi" %>
<form name="forma" method="post" action="<%= url %>C_Rep_CostCenter_Summ.rpt" target="crview">
<input type="hidden" name="prompt0" value="<%= prompt0 %>">
<%@ include file="FireFragmentD.lssi" %>
<%@ include file="FireFragmentE.lssi" %>
below are my jsp pages.. there are two one pulls the parameters and the other fires the rpt.
parameter code:
<%@ page language="java" %>
<%@ page import="java.util.*" %>
<%@ page import="javax.sql.DataSource" %>
<%@ page import="org.jdom.*" %>
<%@ page import="com.maincontrol.rp.beans.*" %>
<%@ page import="com.maincontrol.rp.query.*" %>
<%@ taglib uri="/WEB-INF/dbtags.tld" prefix="dbtags" %>
<%
// CostCenterReport.jsp - Version 1.00 - 01/29/2002 17:47
// Fetch the db.query.vreport.costcenter attribute from the db-statements application scope!
Document dbStatements = (Document)application.getAttribute("db-statements"
Vector hlq1Vector = (Vector)application.getAttribute("list-tables-hlq1"
Vector hlq2Vector = (Vector)application.getAttribute("list-tables-hlq2"
User currentUser = (User)session.getAttribute("user"
HLQDualSet hlqSet = (HLQDualSet)currentUser.getOptions().get("hlqSet"
SimpleXMLPreQuery prequery = new SimpleXMLPreQuery(dbStatements, "preQuery", "db.query.vreport.costcenter"
String queryString1 = prequery.generateQualifiedPreQuery(hlq1Vector, hlq2Vector, hlqSet);
// Prepare a holding String field...
String parmValue;
%>
<HTML>
<HEAD>
<title>Cost Center Report</title>
<link rel="stylesheet" href="rportal-main.css">
</HEAD>
<BODY>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td class="portlettitlebox" align="left" valign="top">
<div align="right">Cost Center Report</div>
</td>
</tr>
</table>
<br>
<form name="form1" method="post" action="C_Rep_CostCenterReportFire.jsp">
<p>Enter A Cost Center parameter for the Cost Center Report:</p>
<table width="100%" border="0" cellspacing="3" cellpadding="3">
<tr>
<td>
<div align="right">Cost Center :</div>
</td>
<td>
<div align="left">
<input type="text" name="name" maxlength="30" size="30" value="">
</td>
</tr>
</div>
</td>
</tr>
<tr>
<td>
<div align="right">
<input type="submit" name="Submit" value="Submit">
</div>
</td>
<td>
<div align="left">
<input type="reset" name="Reset" value="Reset">
</div>
</td>
</tr>
</table>
</form>
<p> </p>
</BODY>
</HTML>
Fire code:
<!-- Version 1.00 - 01/29/2002 12:04 -->
<%@ page language="java" %>
<%@ page import="com.maincontrol.rp.admin.*" %>
<%@ page import="com.maincontrol.rp.beans.*" %>
<%@ page import="com.maincontrol.rp.query.*" %>
<%@ page import="java.lang.*" %>
<%@ page import="java.util.*" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ include file="FireFragmentA.lssi" %>
<title>Cost Center Report (Fire!)</title>
<%@ include file="FireFragmentB.lssi" %>
<%
String prompt0 = (String)request.getParameter("prompt0"
%>
<%
String table = "KOMP";
String view = "XREP_KOMP_BY_ACQ_MODE";
%>
<%@ include file="FireFragmentC.lssi" %>
<form name="forma" method="post" action="<%= url %>C_Rep_CostCenter_Summ.rpt" target="crview">
<input type="hidden" name="prompt0" value="<%= prompt0 %>">
<%@ include file="FireFragmentD.lssi" %>
<%@ include file="FireFragmentE.lssi" %>