Help in passing value to next .asp page
Hi all, i need help on this problem. i want to pass the value of tag_num and platform to the detail.asp, somehow it give me error. below are my code and screenshot.
<%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<tr>
<td height="50" bgcolor="#FFFFFF"><span class="style2"><%=(Recordset1.Fields.Item("tag_num").Value)%></span></td>
<td height="50" bgcolor="#FFFFFF"><span class="style2"><%=(Recordset1.Fields.Item("platform").Value)%></span></td>
<td width="205" bgcolor="#FFFFFF"><span class="style2"><%=(Recordset1.Fields.Item("system").Value)%></span></td>
<td width="41" bgcolor="#FFFFFF"><a HREF="detail.asp?<%= Server.HTMLEncode(MM_keepNone) & MM_joinChar(MM_keepNone) & "tag_num=" & Recordset1.Fields.Item("tag_num").Value & "platform=" & Recordset1.Fields.Item("platform").Value %>">VIEW</a></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
"part of detail.asp code to receive the value"
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.QueryString("tag_num") <> "") Then
Recordset1__MMColParam = Request.QueryString("tag_num")
End If
%>
<%
Dim Recordset1__MMColParam2
Recordset1__MMColParam2 = "1"
If (Request.QueryString("platform") <> "") Then
Recordset1__MMColParam2 = Request.QueryString("platform")
End If
%>
<%
Dim Recordset1
Dim Recordset1_cmd
Dim Recordset1_numRows
Set Recordset1_cmd = Server.CreateObject ("ADODB.Command")
Recordset1_cmd.ActiveConnection = MM_InstrumentDB_STRING
Recordset1_cmd.CommandText = "SELECT * FROM Instrument_baram WHERE tag_num = ? AND platform = ?"
Recordset1_cmd.Prepared = true
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 200, 1, 255, Recordset1__MMColParam) ' adVarChar
Recordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param2", 200, 1, 255, Recordset1__MMColParam2)
Set Recordset1 = Recordset1_cmd.Execute
Recordset1_numRows = 0
%>
to display the dable, this is my code
<table width="450" border="1" cellspacing="0" bordercolor="#FF6600" bgcolor="#1941A5">
<tr>
<th style="background-color:#CEC49D" height="35" scope="row"><span class="style2">TAG NUMBER</span></th>
<td bgcolor="#FFFFFF"><span class="style2"><%=(Recordset1.Fields.Item("tag_num").Value)%></span></td>
</tr>
<tr>
<th style="background-color:#CEC49D" width="200" height="35" scope="row"><span class="style2">PLATFORM</span></th>
<td width="356" bgcolor="#FFFFFF"><span class="style2"><%=(Recordset1.Fields.Item("platform").Value)%></span></td>
</tr>
<tr>
<th style="background-color:#CEC49D" height="35" scope="row"><span class="style2">TYPE OF SYSTEM</span></th>
<td bgcolor="#FFFFFF"><span class="style2"><%=(Recordset1.Fields.Item("system").Value)%></span></td>
</tr>
it give me this error
Please somebody help me. Thanks in advance.
Regards,
Zuma.
yup. my page connected to the server. if i pass "tag_num" value only, it will give me no error. the output is there. but the things is i need to pass "platform" value.
sample of my database structure is
Instrument_baram
tag_num platform field system
AGSC_503
BNP-C
BARONIA
PMCS
AGSC_503
BNP-B
BARONIA
PMCS
TAG NUMBER
TYPE OF INSTRUMENT
SYSTEM
PLATFORM
AGSC_503
Limit switch
PMCS
BNP-C
View
AGSC_503
Limit switch
PMCS
BNP-B
View
if i pass "tag_num" value only, it will select AGSC_503 platform BNP-C only eventhough i click on AGSC_503 platform BNP-B "View".
that why i need to pass the "platform" value
Similar Messages
-
Can applet pass value back to web page?
if i run an applet in a web page, eg: aspx
is it possible for me to pass value back to the page?if say i'm playing a maze, which written in applet.
and the applet is run under a web page.Lika applets usually are.
at the time i solve the maze, it will show a
messagebox,
at the beginning, i plan to write a solving data
fileto the disk, but later i found out applet doesn't
allow writing of file.It does. You just need to sign it.
so i would like to pass the data value back to the
web page, when i click the ok button on the message
box.You didnt' answer my question. Web pages are HTML and don't accept data, so your question as it is makes no sense.
pass back an integer value which store the solvign
time.If you want to talk to Javascript, see my previous post about using Google to find out how. It's often-documented. -
Passing values to next page on Update image click?
Hi Everyone,
I have developed one OAF page which has onw table data to show. The last column is Update Image icon.
Columns are like this: Eno, enmae, comm, address, salary, update.
On clicking on update icon on any row the corresponding Eno and Ename should be passed to next Update page and these two values has to be displayed on teh Update page.
How can i do that?
Please help...
Thanks.PPR event on Update Image would do the magic for you.
Go to the properties of the Image icon and select below
1) Action Type : fireAction
2) Event : updateEmp (This event needs to be captured in the page CO)
3) Parameters :
a)pEmpNo : ${oa.current.EmpNoID} (EmpNoID is the view attribute for Employee Number. You keep proper name of your VO attribute here)
b)pEmpName : ${oa.current.EmpName} (EmpName is the view attribute for Employee Name. You keep proper name of your VO attribute here)
c) Add more parameters if you want to pass maore
4) In processFormRequest of the page catch the event 'updateEmp' and forward to the next page
String eventRaised = pageContext.getParameter("event");
if ("updateEmp".equalsIgnoreCase(eventRaised)) {
HashMap actionHashMap = new HashMap();
String pEmpNo= pageContext.getParameter("pEmpNo");
String pEmpName = pageContext.getParameter("pEmpName");
actionHashMap.put("pParamEmpNo", "{!!" + pageContext.encrypt(pEmpNo)); --always encrypt
actionHashMap.put("pParamEmpName", "{!!" + pageContext.encrypt(pEmpName ));
pageContext.setForwardURL(include the next page function/URL and other parameters along with actionHashMap);
5) In the next page CO, get the passed parameters in processRequest using
String pEmpNo= pageContext.getParameter("pParamEmpNo");
String pEmpName = pageContext.getParameter("pParamEmpName");
--Do your other stuff on how to use these parameters
Hope this will direct you properly.
Regards,
Peddi -
In portlets, how to use a html form passing values to the another page?
it is well known that in web developing , we have two methods to pass values to another page.<!--
1. passing values
2.<form action="nextPage" method ="post"></form>-->
but how to use two methods in oracle portal portlets?
I have got a simple example which submit two values to the page for itself, means a page has a form with submit botton, user input the form with values and then submit them by submit botton, then the page recevice those values and show it .
this example is powered by oracle ,
please have a look at these code:
<br><br>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="java.util.*, oracle.portal.provider.v2.*" %>
<%@page import="oracle.portal.provider.v2.http.HttpCommonConstants" %>
<%@page import="oracle.portal.provider.v2.render.PortletRendererUtil" %>
<%@page import="oracle.portal.provider.v2.render.PortletRenderRequest" %>
<%@page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil" %>
<%@page import="oracle.portal.provider.v2.url.UrlUtils" %>
<%
// The form submit URL refers to the current Portal page. All portlets
// on this page share this URL. This means that the per portlet parameters
// are in the same request. Portlets must ensure that its paramerters don't
// collide either with other portlets or other instances of itself. This
// is generally accomplished by using "fully-qualified" parameter names. A
// fully-qualified parameter name prepends the (unique) portlet reference to
// the parameter. The JPDK provides a utility to accomplish this.
String portletParamName = "mName";
String portletParamAge = "mAge";
String portletParamSubmit = "mSubmit";
String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
// These are the session attribute names used to store the current values.
// Because all instances of this portlet share the same user session we must
// also fully-qualify these names to avoid collisions.
String sName = HttpPortletRendererUtil.portletParameter(request, "sName");
String sAge = HttpPortletRendererUtil.portletParameter(request, "sAge");
PortletRenderRequest pRequest = (PortletRenderRequest)
request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
String formName = UrlUtils.htmlFormName(pRequest,null);
ProviderUser user = pRequest.getUser();
ProviderSession providerSession = user.getSession();
if (providerSession == null)
%>
Your provider session has been terminated or has timed out
and you need to logout and then login to re-establish the session.
<%
else
// Record, in session storage, the last values submitted.
if (pRequest.getQualifiedParameter(portletParamSubmit) != null)
providerSession.setAttribute(sName, pRequest.getQualifiedParameter(portletParamName));
providerSession.setAttribute(sAge, pRequest.getQualifiedParameter(portletParamAge));
%>
<!-- Output the HTML content -->
<center>
<table width="70%">
<tr>
<td>
<b>This portlet shows how to post and process information from HTML forms.</b>
</td>
</tr>
</table>
<form name="<%= formName %>" method="POST"
action="<%= UrlUtils.htmlFormActionLink(pRequest,UrlUtils.PAGE_LINK) %>">
<%= UrlUtils.htmlFormHiddenFields(pRequest,UrlUtils.PAGE_LINK, formName) %>
<table>
<tr>
<td>
<b>Name :</b>
</td>
<td>
<input type="text" size="20" name="<%= fName %>" value="">
</td>
</tr>
<tr>
<td>
<b>Age : </b>
</td>
<td>
<input type="text" size="3" name="<%= fAge %>" value="">
</td>
</tr>
</table>
<br>
<INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
</form>
<%
if ((providerSession.getAttribute(sName) == null)&& (providerSession.getAttribute(sAge) == null)) {
%>
<b>No values have been submitted yet.</b>
<%
} else {
%>
<b> Last submitted values:</b><br>
<table>
<tr>
<td>
<b>Name: </b>
</td>
<td>
<b><%= providerSession.getAttribute(sName) %></b>
</td>
</tr>
<tr>
<td>
<b>Age: </b>
</td>
<td>
<b><%= providerSession.getAttribute(sAge) %></b>
</td>
</tr>
</table>
<%
%>
</center>
<%
%>
<br><br>
<br><br>
<br><br>
but I want to write the form in a page , and then show it on another page , how to write it ?
I have read the pdk:
oracle.portal.provider.v2.url Classes
UrlUtils
then I use these method , as this :
//frist page:
<br><br><br><br>
<%@page contentType="text/html; charset=Big5"
import="oracle.portal.provider.v2.render.PortletRenderRequest"
import="oracle.portal.provider.v2.http.HttpCommonConstants"
%>
<%@ page import="oracle.portal.provider.v2.*"%>
<%@ page import="oracle.portal.provider.v2.render.PortletRendererUtil"%>
<%@ page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"%>
<%@ page import="oracle.portal.provider.v2.url.UrlUtils"%>
<%
PortletRenderRequest pReq = (PortletRenderRequest)
request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
%>
<P>Hello <%= pReq.getUser().getName() %>.</P>
<P>This is the <b><i>Show</i></b> render mode!</P>
this is a program to test the passing value
<%
String portletParamName = "mName";
String portletParamAge = "mAge";
String portletParamSubmit = "mSubmit";
String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);
PortletRenderRequest pr=(PortletRenderRequest)request.getAttribute(HttpCommonConstants.PORTLET_RENDER_REQUEST);
String formName=UrlUtils.htmlFormName(pr, null);
%>
<form name="<%=formName%>" method="post" action="<%=UrlUtils.htmlFormActionLink("/htdocs/passingvalues4/getValues.jsp")%>">
<%= UrlUtils.htmlFormHiddenFields("/htdocs/passingvalues4/getValues.jsp") %>
name:<input type="text" size="20" name="<%= fName %>" value="">
p w :<input type="text" size="3" name="<%= fAge %>" value="">
<INPUT TYPE=submit name="<%= fSubmit %>" Value="Submit">
</form>
//getValues.jsp<br><br>
<br><br>
<%@page contentType="text/html; charset=Big5"
import="oracle.portal.provider.v2.render.PortletRenderRequest"
import="oracle.portal.provider.v2.http.HttpCommonConstants"
%>
<%@ page import="oracle.portal.provider.v2.*"%>
<%@ page import="oracle.portal.provider.v2.render.PortletRendererUtil"%>
<%@ page import="oracle.portal.provider.v2.render.http.HttpPortletRendererUtil"%>
<%@ page import="oracle.portal.provider.v2.url.UrlUtils"%>
<% String portletParamName = "mName";
String portletParamAge = "mAge";
String portletParamSubmit = "mSubmit";
String fName = HttpPortletRendererUtil.portletParameter(request, portletParamName);
String fAge = HttpPortletRendererUtil.portletParameter(request, portletParamAge);
String fSubmit = HttpPortletRendererUtil.portletParameter(request, portletParamSubmit);%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Big5">
<title>untitled</title>
</head>
<body>
Name:<%=fName%>
Age :<%=fAge%>
</body>
</html>
<br>then I deployed them on the portal , run it , the result is :after I submit it , the browser give me : http 404 page not found!
[b]here is the provider.xml<br>[b[i]]<?xml version = '1.0' encoding = 'UTF-8'?>
<?providerDefinition version="3.1"?>
<provider class="oracle.portal.provider.v2.DefaultProviderDefinition">
<session>true</session>
<passAllUrlParams>true</passAllUrlParams>
<portlet class="oracle.portal.provider.v2.DefaultPortletDefinition">
<id>1</id>
<name>PassingValues4</name>
<title>PassingValues4</title>
<description>PassingValues4</description>
<timeout>60</timeout>
<showEditToPublic>false</showEditToPublic>
<hasAbout>false</hasAbout>
<showEdit>false</showEdit>
<hasHelp>false</hasHelp>
<showEditDefault>false</showEditDefault>
<showDetails>false</showDetails>
<renderer class="oracle.portal.provider.v2.render.RenderManager">
<renderContainer>true</renderContainer>
<renderCustomize>true</renderCustomize>
<autoRedirect>true</autoRedirect>
<contentType>text/html</contentType>
<showPage>/htdocs/passingvalues4/PassingValues4InputPage.jsp</showPage>
<showPage>/htdocs/passingvalues4/getValues.jsp</showPage>
</renderer>
</portlet>
</provider>
<br><br><br>
<br><br>
would you kind enough to help me ? thanks!!!
Message was edited by:
moonsoftHi Moonsoft,
I have already answered this query in the other post at Re: how to link more than one links in portlet?(jsp develop)
<form name = "showPageForm" method = "POST" action = "<%= UrlUtils.htmlFormActionLink(pReq,UrlUtils.PAGE_LINK) %>">
<%= UrlUtils.htmlFormHiddenFields(pReq,UrlUtils.PAGE_LINK, "showPageForm") %>
<input type="text" name="param1">
<input type="text" name="param2">
<input type="hidden" name="myPPN" value="/htdocs/page2.jsp">
</form>then in your jsp code on page2.jsp, you will extract the parameters by specifying
<%
String p1 = request.getParameter("param1");
String p2 = request.getParameter("param2");
%>
>>this is easy common jsp or asp development, but in oracle is too diffcult!!!!
:-) .. there is a difference between web-applications and portlets, you just need to get used to it once. I hope this does clarify your doubts.
thanks,
Harsha -
Pass values to OAF search page (View Purchase Order History)
I need to call a OAF page from a PO Approval Notification. I need to call page View Purchase Order History (func:ICX_PO_REVISIONS).
I am able to create the URL (using function FND_RUN_FUNCTION.get_run_function_url) and when I click on the link it opens the page fine, but it’s a page that contains simple search region and I need to populate the Operating Unit and PO Number fields (I can easily get from the PO) of the search fields, this will allow the user to just click the go button.
Is it possible using the function FND_RUN_FUNCTION.get_run_function_url and passing parameters (field values) or setting the URL to JSP:/OA_HTML/OA.jsp?OAFunc=ICX_PO_REVISIONS&akRegionApplicationId=177&addBreadCrumb=Y&CorePO=Y and then passing the parameters?
How would you achieve this if possible, call the page and populate the search field values? It does not seem to work, I have been able to pass paramaters to an OAF page that does not contain a simple search region to return results.
Function paramaters:
FND_RUN_FUNCTION.get_run_function_url (
p_function_id => 3101,
p_resp_appl_id => 201,
p_resp_id => 50598, -- MS Purcahsing Superuser
p_security_group_id => 0,
p_parameters => 'PoNum=' || l_document_id || '&' || 'retainAM=Y' || '&' || 'addBreadCrumb=Y',
p_override_agent => NULL,
p_org_id => 101,
p_lang_code => NULL,
p_encryptParameters => FALSE);
Thanks,
ShaunWhat I found is there are 2 variables SiteName and SiteName1, if you use SiteName1 then it shows proper value as a site description. I replaced SiteName with SiteName1 and it works. This might help to all who are like me and trying Tutorial example.
I am not sure how many may have tried OAF - Tutorial examples. They are really complicated and not easy and in most cases they are not coming out in first try but if you really try then it will give lot of understanding. -
Passing values to the JSP page - Urgent
Hi all,
I have to pass the user id value to the JSP page. I have written the following code in the doInitialization() method
IPortalComponentRequest request = (IPortalComponentRequest) this.getRequest();
IPortalComponentContext myContext = request.getComponentContext();
IPortalComponentProfile myProfile = myContext.getProfile();
IAuthentication ia = UMFactory.getAuthenticator();
IUser portalUser = ia.getLoggedInUser(request.getServletRequest(), request.getServletResponse(false) );
s = portalUser.getUniqueName();
IPortalComponentSession componentSession = ((IPortalComponentRequest)getRequest()).getComponentSession();
Object o = componentSession.getValue("myEvents");
myEvents = (LoadEvents)o;
//myEvents = (LoadEvents) myContext.getValue("myEvents");
myEvents.setUserId(s);
myContext.putValue("myBeanName", myEvents);
I have also defined myEvents as a bean in my JSP page with scope APPLICATION. But I get User Id as "NULL".
Thanks in advance.
Rgds,
Janvi.Hi Prakash,
Please find the jsp code pasted below:
<hbj:content
id="myContext">
<hbj:page
title="Successful processing">
<jsp:useBean id="myMeet" scope="application" class="com.sap.ep.bluestar.LoadEvents" />
<jsp:useBean id="myEvents" class="com.sap.ep.bluestar.MonthView" scope="application" />
<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" %>
<%
int leadSpaces, daysInMonth, leadSpaces_next,daysInMonth_next, col_Counter;
myCal.setMonthView();
java.util.Vector printVal_pre = new java.util.Vector();
myCal.printMonth(myCal.getPre_month(),myCal.getPre_year());
printVal_pre = myCal.getPrintValues();
java.util.Vector printVal_cur = new java.util.Vector();
myCal.printMonth(myCal.getCur_month(),myCal.getCur_year());
printVal_cur = myCal.getPrintValues();
java.util.Vector printVal_next = new java.util.Vector();
myCal.printMonth(myCal.getNext_month(),myCal.getNext_year());
printVal_next = myCal.getPrintValues();
if(request.getMethod().equals("POST")){
try {
String action =(String) request.getParameter("action");
if(action.equals("insert")){
// response.sendRedirect("_insertEvent.jsp");
//response.sendRedirect("test.html");
} catch(Exception e) {
System.out.println(e.getMessage());
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<script language="javascript">
function insertEvent(frm,eventDay){
alert("here finally " + eventDay + " " + frm.eventMonth.value + " " + frm.eventYear.value );
frm.action.value = "insert";
frm.submit();
function openWin(frm,eventDay)
var newWin = window.open("http://localhost:50100/irj/servlet/prt/portal/prtroot/Web_Calendar.eventHandler?variable=" + frm.eventMonth.value + "/" + eventDay + "/" + frm.eventYear.value, 'popup',
'resizable,height=200,width=325');
if(newWin.focus) newWin.focus();
</script>
</head>
<body>
User is : <%= myCal.getUserId() %>
<table width="745" height="583" border="0">
<tr>
<td width="258" height="23" align="center"><B> <% out.println(printVal_pre.elementAt(0).toString() + " " + printVal_pre.elementAt(1).toString());
leadSpaces = ((Integer)printVal_pre.elementAt(2)).intValue();
daysInMonth = ((Integer)printVal_pre.elementAt(3)).intValue();
%> </B> </td>
<td width="215"> </td>
<td width="258" align="center"><B> <% out.println(printVal_next.elementAt(0).toString() + " " + printVal_next.elementAt(1).toString());
leadSpaces_next = ((Integer)printVal_next.elementAt(2)).intValue();
daysInMonth_next = ((Integer)printVal_next.elementAt(3)).intValue();
%> </B></td>
</tr>
<tr>
<td height="151"><table width="245" border="1">
<tr>
<th width="35" scope="col"><div align="center">S</div></th>
<th width="35" scope="col"><div align="center">M</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">W</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">F</div></th>
<th width="35" scope="col"><div align="center">S</div></th>
</tr><tr>
<% col_Counter = 0;
for (int i = 0; i < leadSpaces; i++) {
out.print("<td> </td>");
col_Counter++;
for (int i = 1; i <= daysInMonth; i++) {
// This "if" statement is simpler than messing with NumberFormat
if(i < 9) {
out.print("<td align='center'>" + " " + i + "</td>");
col_Counter++;
} else {
out.print("<td align='center'>" + i + "</td>");
col_Counter++;
if ((leadSpaces + i) % 7 == 0) { // Wrap if EOL
out.println("</tr><tr>");
int cnt = col_Counter;
if(col_Counter == 28){
out.println("</tr>");
}else {
for(int i = 0; i < (42 - col_Counter);i++){
out.print("<td> </td>");
cnt++;
if((cnt%7) ==0)
out.println("</tr><tr>");
out.println("</tr>");
%>
</table></td>
<td> </td>
<td><table width="245" border="1">
<tr>
<th width="35" scope="col"><div align="center">S</div></th>
<th width="35" scope="col"><div align="center">M</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">W</div></th>
<th width="35" scope="col"><div align="center">T</div></th>
<th width="35" scope="col"><div align="center">F</div></th>
<th width="35" scope="col"><div align="center">S</div></th>
</tr>
<tr>
<% col_Counter = 0;
for (int i = 0; i < leadSpaces_next; i++) {
out.print("<td> </td>");
col_Counter++;
for (int i = 1; i <= daysInMonth_next; i++) {
// This "if" statement is simpler than messing with NumberFormat
if(i < 9) {
out.print("<td align='center'>" + " " + i + "</td>");
col_Counter++;
} else {
out.print("<td align='center'>" + i + "</td>");
col_Counter++;
if ((leadSpaces_next + i) % 7 == 0) { // Wrap if EOL
out.println("</tr><tr>");
cnt = col_Counter;
if(col_Counter == 28){
out.println("</tr>");
}else {
for(int i = 0; i < (42 - col_Counter);i++){
out.print("<td> </td>");
cnt++;
if((cnt % 7 ) ==0)
out.println("</tr><tr>");
out.println("</tr>");
%>
</table></td>
</tr>
<tr>
<td colspan="3"><table width="735" height="383" border="1">
<tr>
<td colspan="7" align="center"><B> <% out.println(printVal_cur.elementAt(0).toString() + " " + printVal_cur.elementAt(1).toString());
leadSpaces = ((Integer)printVal_cur.elementAt(2)).intValue();
daysInMonth = ((Integer)printVal_cur.elementAt(3)).intValue();
%> </B></td>
</tr>
<tr>
<th width="105" scope="col">SUN</th>
<th width="105" scope="col">MON</th>
<th width="105" scope="col">TUE</th>
<th width="105" scope="col">WED</th>
<th width="105" scope="col">THUR</th>
<th width="105" scope="col">FRI</th>
<th width="105" scope="col">SAT</th>
</tr>
<form name="eventCal" method="post" action="Web_Cal.jsp">
<input name="eventMonth" type="hidden" value="<%= myCal.getCur_month() + 1 %>">
<input name="eventYear" type="hidden" value="<%=myCal.getCur_year() %>">
<input name="action" type="hidden" value="">
<tr>
<% col_Counter = 0;
for (int i = 0; i < leadSpaces; i++) {
out.print("<td> </td>");
col_Counter++;
for (int i = 1; i <= daysInMonth; i++) {
// This "if" statement is simpler than messing with NumberFormat
if(i < 9) {
out.print("<td align='center'>" + " " + "<a href='javascript:openWin(document.eventCal," + i + ");'>" + i + "</a></td>");
col_Counter++;
} else {
out.print("<td align='center'>" + "<a href='javascript:openWin(document.eventCal," + i + ");'>" + i + "</a></td>");
col_Counter++;
if ((leadSpaces + i) % 7 == 0) { // Wrap if EOL
out.println("</tr><tr>");
if(col_Counter == 28){
out.println("</tr>");
}else if(col_Counter < 35){
for(int i = 0; i < (35 - col_Counter);i++)
out.print("<td> </td>");
out.println("</tr>");
}else {
for(int i = 0; i < (42 - col_Counter);i++)
out.print("<td> </td>");
out.println("</tr>");
%> </form>
</table></td>
</tr>
</table>
</body>
</html>
</hbj:textView>
</hbj:page>
</hbj:content>
Regards,
Janvi -
OBIEE passing value to a dashboard page using href
Hi All,
I am trying to pass year and month values from Report 1 to a dashboard page (having multiple reports) using the href function. The code i have used is -
case when "Dim - KPI"."KPI Name"='Application Availability' then '<--a href="http://172.18.43.143:9704/analytics/saw.dll?Dashboard&PortalPath=/shared/Service Availability/_portal/Service Availability&Page=Application Availability&Action=Navigate&P0=1&P1=eq&P2=Dim%20-%20All%20Purpose%20Date"."Month%20%20 Name"&P3='||"Dim - All Purpose Date"."Month Name"||'style="">'||'test'||'<--/a>'end
With this code I am being able to navigate to the desired portal path, but the values are not getting prompted. Can't figure out why? Please help......
Thanks
Srus
Edited by: user10718864 on Jun 22, 2011 3:08 AMHi Dan,
1) I have tried standard navigation. The measure column is a dimension value, when i try to put multiple navigation paths on a actual value, it gives me a navigation menu. So i want to use conditional navigation i.e when the measure value is Application Availability , i should be able to navigate to application availability dashboard page and when my measure is Outage, it should take me to outage page instead.
2) Yes i am using same columns for month and year for all 6 reports.
3) Yes i have mentioned year and month as is prompted in all the reports.
Please help
Thanks Srus -
! Help - I need to connect my asp page with my oracle XE
Hello friends
I use the sqldeveloper to convert my database from sql server to oracle. Now I got the problem. How to connect my pages (asp) with the oracle database.
Can someone help me?Hello,
Oracle Object for OLE (OO4O) may help yopu in that case.
Please refer to http://www.oracle.com/technology/tech/windows/ole/index.html
I hope this will help
Kind regards,
Jean-Patrick -
Help With Passing Values to a Subquery
Hello,
I am new to the SQL programming language. I have a fairly simple query that reads as follows:
SELECT Utility_Type,Instance_ID, WINS_Current_Amount/
(SELECT AVG
(CASE WHEN (Corrected_Usage_Standardized IS NULL AND Extrapolated_Usage IS NOT NULL)
THEN (WINS_Current_Amount/Extrapolated_Usage)
WHEN (Corrected_Usage_Standardized IS NOT NULL AND Extrapolated_Usage IS NULL)
THEN (WINS_Current_Amount/Corrected_Usage_Standardized)
END)
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
WHERE WINS_Account_Number = '021202000'
AND (Corrected_Usage_Standardized IS NOT NULL OR Extrapolated_Usage IS NOT NULL)
AND (('10-01-2013' <= WINS_Invoice_Date) AND (WINS_Invoice_Date <= '09-30-2014')))
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
WHERE WINS_Account_Number = '021202000'
AND (Corrected_Usage_Standardized IS NULL AND Extrapolated_Usage IS NULL)
AND (('10-01-2013' <= WINS_Invoice_Date) AND (WINS_Invoice_Date <= '09-30-2014'))
All the data I am concerned with is coming from a single table with a long-winded name (All_Utility_Data_Standardized_With_Extrapolated_Values). Essentially, the subquery takes the average of the calculated unit cost and applies that unit cost to where values
for the Current_Amount are not corrected or extrapolated. This query works great when I manually input the account number i.e. ('021202000'). But now I want to pass it 3,283 other accounts which I obtain from the following query using the same table:
SELECT DISTINCT(WINS_Account_Number)
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
WHERE Corrected_Usage_Standardized IS NULL
AND Extrapolated_Usage IS NULL
AND ((WINS_Invoice_Date > '10-01-2013') AND (WINS_Invoice_Date < '09-30-2014'))
I tried to put this query in place of '021202000' but it says that Subquery returned more than 1 value which I understand why, but I'm not sure how to fix. All I want to do is one-by-one place a new account number in the bold statement in the first query
and update a table using the calculated values. Each account may have any number of results (multiple averaged results), but I need to make sure the averaging only occurs using values specific to the account entered in bold. If that makes any sense. Anyways,
any help would be much appreciated as I am just starting to learn SQL. Thanks.
KevinHi Kevin,
To fix the subquery error you just need to change "=" to "IN".
However, the query will probably run a lot faster if you use an inner join instead, like so:
SELECT Utility_Type,Instance_ID, WINS_Current_Amount/
(SELECT AVG
(CASE WHEN (Corrected_Usage_Standardized IS NULL AND Extrapolated_Usage IS NOT NULL)
THEN (WINS_Current_Amount/Extrapolated_Usage)
WHEN (Corrected_Usage_Standardized IS NOT NULL AND Extrapolated_Usage IS NULL)
THEN (WINS_Current_Amount/Corrected_Usage_Standardized)
END)
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
INNER JOIN
SELECT DISTINCT(WINS_Account_Number)
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
WHERE Corrected_Usage_Standardized IS NULL
AND Extrapolated_Usage IS NULL
AND ((WINS_Invoice_Date > '10-01-2013') AND (WINS_Invoice_Date < '09-30-2014'))
) Accts ON All_Utility_Data_Standardized_With_Extrapolated_Values.WINS_Account_Number = Accts.WINS_Account_Number
AND (Corrected_Usage_Standardized IS NOT NULL OR Extrapolated_Usage IS NOT NULL)
AND (('10-01-2013' <= WINS_Invoice_Date) AND (WINS_Invoice_Date <= '09-30-2014')))
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
INNER JOIN
SELECT DISTINCT(WINS_Account_Number)
FROM All_Utility_Data_Standardized_With_Extrapolated_Values
WHERE Corrected_Usage_Standardized IS NULL
AND Extrapolated_Usage IS NULL
AND ((WINS_Invoice_Date > '10-01-2013') AND (WINS_Invoice_Date < '09-30-2014'))
) Accts ON All_Utility_Data_Standardized_With_Extrapolated_Values.WINS_Account_Number = Accts.WINS_Account_Number
AND (Corrected_Usage_Standardized IS NULL AND Extrapolated_Usage IS NULL)
AND (('10-01-2013' <= WINS_Invoice_Date) AND (WINS_Invoice_Date <= '09-30-2014'))
Cheers
Lucas
LucasF -
Hi all
I want to pass a value from program A to program B. However it not working, please help if u see any mistake in the code below. Many thanks!!!
do this and see. create 2 programs like this
REPORT ztest_gopi. " ZTEST_GOPI
PARAMETERS : p_c(3) TYPE c.
START-OF-SELECTION.
EXPORT p_c TO MEMORY ID 'MID'.
" Report 2
REPORT ztest_gopi1. " ZTEST_GOPI1
PARAMETERS : p_c(3) TYPE c.
INITIALIZATION.
IMPORT p_c FROM MEMORY ID 'MID'.Below is my code. I tested is not work. Please help me to see any error.
The bold text is my unsure sytnax.
REPORT ZGARY_PASS1.
TABLES tvarvc.
PARAMETERS : p_c(3) TYPE c.
<b>DATA: wa_tvarvc TYPE tvarvc.</b>
select single *
into wa_tvarvc
from tvarvc
where NAME = sy-repid and
type = 'P' and
numb = '0000'.
if sy-subrc eq 0.
Record already exist, so modify record
wa_tvarvc-low = p_c.
modify tvarvc from wa_tvarvc.
if sy-subrc eq 0.
commit work.
endif.
else.
Record doe snot exist, so add record
wa_tvarvc-low = p_c.
insert tvarvc from wa_tvarvc.
if sy-subrc eq 0.
commit work.
endif.
endif.
REPORT ZGARY_PASS2.
TABLES tvarvc.
PARAMETERS : p_c(3) TYPE c.
<b>DATA: wa_tvarvc TYPE tvarvc.</b>
select single *
into wa_tvarvc
from tvarvc
where NAME = 'ZGARY_PASS1' and
type = 'P' and
numb = '0000'.
if sy-subrc eq 0.
*Assign wa_tvarvc-low to your desired parameter.
<b>p_c = wa_tvarvc-low.</b>
endif. -
Question on passing value to an HTML page and dynamic links
Hi,
I just started using Oracle APEX and have the following questions:
1) I try to pass an order number from a report page to a blank HTML page that is supposed to be a shipping label. I cannot have the HTML page resolve the placeholder within HTML code to actual order number. I have tried %P2_ORDER_ID%, #P2_ORDER_ID# or &P2_ORDER_ID. Any suggestions?
2) I have a column with link in a report page and I want the link to go to different pages based on the value of that column. How should I do that?
Thanks!
Mike.Hi All,
Im still trying to think about this the right way.
If I add a servlet to the C2 project and use HTTP post from the HTML page and have the 2 variables in the servlet, could I then either set the variables on the session bean in order to make them available to my searchResults.jsp bean methods?
Regards
Jim -
Passing values to current jsp page to another jsp page in ADF
Hi All,
In my adf application i want to get the appropriate field value of selected row and i want to send that value to the another jsp page from curent jsp page when will we click on button or link.How can i do this.Please give me your valuable suggestions.I'm using jdeveloper 11.1.1.5 version. Thanks!Hi,
Thanks for the reply. I didnt understand the execution of the process. can you please send any sample for text like hello world is passing to second jsp page. or any simple sample? -
Need help regarding passing values!
Hi All,
I have a page in an application (Multiuser). My Page Region consists of rows selected out of a sql query and with each row selector (radio button). I need the value selected in a forthcoming page. How can i accomplish this effectively.
Should i try inserting the selected value into a temporary table and then select from the same.
Or whether should i pass as a parameter (how to do this)?
Please comment on this.
Thanks & RegardsThe easy answer is to store the data in a file, load it at the beginning of the code and also reload it when ever the sensor is changed. You should encapsulate this in 2 functional sub vi - load config and store config. The load event will take a serial number and return values for all settings, and the save takes the serial number and settings and a location on where to store the information, and returns an error cluster is it fails. The tricky part is how and where to store this information. The most popular methods (there are a few threads on this) are ascii text files, xml, .ini files and inside a database. The tradeoffs are difficulty or programming vs flexibility. Speed and space requirements are usually no longer a bottleneck in a task like this.
Paul
Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA -
Forward string value to next JSP page
Hi there !
I display several String results from query.
Now,
user should click the String and it forwards user to next page(page2.jsp).
In the page2.jsp , I need to request.getParameter("end_time");
Below is code :-
Please help ASAP guys !
while (outerRset.next())
lot_number = outerRset.getString(1);
end_time = outerRset.getString(2);
/* Print TRDB LOT */
%>
<TR><TD> Lot Number= <%= lot_no%> </TD></TR>
So, user should click on this lot_no and he/she gets forwarded to page2.jsp.Hi there !
Page1.jsp is as such :-
<TD><%= lot_number%></TD>
<TD><%= end_time %></TD>
Page2.jsp is as such :-
String machine_end_time = new String();
machine_end_time = request.getParameter("end_time");
I get 'null' in Page2.jsp ! SO, it ain`t working !!!
Do I need to include page1.jsp in page2.jsp ? If yes, how so ?
Plz Help, people ! -
Help with passing values to methods
GregorianCalendar baseTime = new GregorianCalendar();
long baseSystemTime = System.currentTimeMillis();
// After some iterations I want to update the
// calendar to reflect the current time.
// I do not want to go through instantiating a new calendar
baseTime = updateTimestamp(baseTime,baseSystemTime);
private static GregorianCalendar updateTimestamp(GregorianCalendar GC, long lastTime){
// This gets the difference between the last time check and now.
// It then adds that difference to the calendar and returns the updated
// calendar.
int msDifference =
new Long(System.currentTimeMillis() - lastTime).intValue();
GC.add(GregorianCalendar.MILLISECOND,msDifference);
lastTime = new Long(System.currentTimeMillis()).longValue();
return GC;
}The problem is that the lastTime variable that it passed gets updated to the current MS value. But, the original baseSystemTime never changes.
I thought that if you pass something to a method and it gets altered in the method the original object is updated. Am I wrong?So objects are passed by reference but primitives are
passed by value?Simply speaking: Yes.
Strictly speaking: No. Every parameter is passed by value because Object obj IS a reference. So when you do call(myObject), you are passing the value of the reference of the object (the adress of the object).
Maybe you are looking for
-
Excise invoice capture with multiple batches
Hi We have created a Purchase order for Material X and carried out the transfer posting(MB1B)and selected two different batched of stocks, and created excise invoice using t code J1IS. When I am capturing the excise invoice in J1IEX. with ref to Purc
-
Video issues in mac os 10.6.4 and windows 7 64x
To start with, my computer is the late 2008 model Imac, has 3g of memory, and wasn't experiencing any video problems until earlier this month. I've already had it serviced, and was told that the issue was resolved, and was unrelated to hardware. Fift
-
Outgoing\Vendor Payment through Check
Hi All, I am trying to create Outgoing payment\Vendor payment, can any provide me the code for the same, like what are the things need to me set to create Outgoing payment like check account\cash account. What would be code when we try to create chec
-
As one of the project requirements, I have to provide a functionality in my application to be able to change the selection color of the text box. Having no provision in Flash, I searched on the net and found one good example of doing that with flash.
-
SQL Report ref. Item Groups
Hi Experts I have a User Defined Field on the face of all Sales Invoices which records the date a Maintenance Contract expires (manually entered by User). All my Maintenance Contracts belong to item groups beginning with "MAIN..." I want to be able t