on 05-01-2007 9:09 AM
Hi All,
Can anybody explain me something about xMII Reports? Why and how is xMII Reports used? How is it related to Servlets?
Thanks,
Lipsa.
Hi,
For xMII Report Generation help you can get the information from help
http://seal-or/LighthammerCMS/Help/SAP_xMII_Help.htm
Before explaining the reason why xMII using the IRPT session variables, i will explain how it is using.
If you are using irpt based session variables you will create the session variable in the URL itself. They will be stored in Illuminator engine till the time of navigation.while using the setPropertyValue(), the value is stored browser as a cookie. Similarly it also stores the usernames, localization parameters everything in Illuminator engine in the form of XML schemas.
Now i will explain why should we use the IRPT variables.
1. Security reasons for cookies at that time you can not pass parameters in browser session variables.
2. Variable will be live till the time of total session, where as in most of the cases it should not after transferring the data from one page to another one.Even in the case of cookie you can reset the value of the variabe.
In the case of irpt session variable no need to reset the session variable.
I hope this explanation gives enough idea about this things.
BLOG : <b>How to pass data dynamically between pages in xMII 11.5</b>
/people/abesh.bhattacharjee/blog/2006/11/29/how-to-pass-data-dynamically-between-pages-in-xmii-115
Regards
Vijaya
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All,
I am trying to pass session variable from one html page to another, but failing. I have followed all the steps as in the url "/people/abesh.bhattacharjee/blog/2006/11/29/how-to-pass-data-dynamically-between-pages-in-xmii-115 Still then, i am unable to pass the variable.
Can anybody please help???
Answer required urgently.
Thanks,
Lipsa.
Hi,
In the first htm page, I am setting the value in the following manner:-
var CampaignName = document.BatchDurationApp.getGridObject().getSelectedCellValue(1);
document.BatchDurationApp.setPropertyValue"CampaignName",CampaignName);
In the second htm page:-
var CampaignName = document.TrendChart.getPropertyValue(CampaignName);
But I am unable to get the variable in the next page.
Please let me know where is the problem.
Am I going right??
Thanks,
Lipsa.
Hi Lipsa,
I think you made mistake in second html file. Here I am giving example try with this. You should palce your dir in server c:\lighthammer\....
<b>first.html</b><HTML><HEAD><TITLE> Report Generation </TITLE></HEAD>
<SCRIPT> function setdata(){ document.displayname.setPropertyValue("aaa",document.nameform.name.value);
window.open("second.html"); } </SCRIPT>
<BODY><APPLET NAME="displayname" CODEBASE="/Illuminator/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="1" HEIGHT="1" MAYSCRIPT>
</APPLET>
<FORM NAME="nameform" > Enter Your Name : <INPUT TYPE="text" NAME="name" MAXLENGTH="30" >
<INPUT TYPE="button" VALUE="Display" onClick="setdata()" >
</FORM></BODY> </HTML>
<b>second.html</b>
<HTML><HEAD><TITLE> New Document </TITLE> <H5> The Name you entered is : </H5>
</HEAD><SCRIPT> function displayname() {
var getname = document.resultform.getPropertyValue("property_value");
alert( " name : " + document.resultform.getPropertyValue("aaa") );document.write(getname); } </SCRIPT>
<BODY onLoad="displayname()"> <APPLET NAME="resultform" CODEBASE="/Illuminator/Classes" CODE="iGrid" ARCHIVE="illum8.zip" WIDTH="1" HEIGHT="1" MAYSCRIPT > </APPLET> <FORM NAME="result"> </FORM></BOdy>
</HTML>
regards
Vijaya
Hi,
In second html file call the method as
function showTrend()
{
var CampaignName = document.TrendChart.getPropertyValue("CampaignName");
document.TrendChart.getQueryObject().setParam(1,CampaignName);
document.TrendChart.getChartObject().setTitle("Trend for Batch : " + CampaignName);
document.TrendChart.refresh();
}
Regards
Vijaya
Hi Lipsa,
Applet Tag is Like this
<APPLET NAME="TrendChart" WIDTH="400" HEIGHT="300" CODE="iChart" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
<PARAM NAME="QueryTemplate" VALUE="">
<PARAM NAME="DisplayTemplate" VALUE="">
<PARAM NAME="Param.1" VALUE=""> <PARAM NAME="Title" VALUE="Trend for : ">
</APPLET
</head>
<body onLoad="showTrend()">
I think this will solve your problem
Award points if the answer is helpful
Regards
Vijaya
Hi,
Thank you so much for such a detail explanation,
but I am still failing.
I have saved my files first.html and second.html in the directory C:\Inetpub\wwwroot\xMES.
As you said, I should place the dir in server c:\lighthammer\...
Can yoy please throw some light on this statement? I did not get your point.
Am I saving my files in the wrong place?
Thanks,
Lipsa.
Hi Lipsa,
You can place your dir inside /Inetpub/wwwroot also.
how you are executing in browser??
steps for execution is:
1) Logon to xMII , give username, pw
2) After that in the same page give your dir and filename like
http://<server name>/dir name/filename ( no need to give /Inetpub/...)
I think you didn't given this path
Try and comeback here
regards
Vijaya
Hi Vijaya,
I am doing that only.
My dir is inside Inetpub\wwwroot.
And as far as executing is concerned,
I execute the htm file in a new IE window and give the path as http://localhost:5900/xMES/first.html.
Anything else I have to do??
Regards,
Lipsa.
Hi Lipsa,
Are you using PlasticResin Database ??
if not --
Better to make 2 query templates.Create BatchData table
In 1st query temp : mode is query,select the cols to print data
In 2nd query temp: mode is fixed query,
select BatchData.BatchId .... from BatchData where BatchData.BatchId='[Param.1]'.
Use 1st query in Batch.html
2nd query in Trend.html
regards
vijaya
Hi,
I have done the same.
In the Batch.htm, I have used batchDurationQuery,
while in Trend.htm, I have used batchDurationChartQuery.
The only thing is, batchDurationQuery is set to mode 'Fixed Query' with Quey as
SELECT CampaignName as "Campaign Name", BatchName as "Batch Name", total_planned_duration/60000 as "Planned Duration", total_exec_duration/60000 as "Actual Duration" FROM SAP_BATCH_DURATION_VIEW WHERE CampaignName = '[Param.1]'
& batchDurationChartQuery is set to mode 'Query' with FilterExpr as SAP_BATCH_DURATION_VIEW.CampaignName='[Param.1]'
Hopefully this is right.
Regards.
Lipsa.
Hi,
I am sending you the whole code of both the Batch.htm & Trend.htm.
You please go thru the code once. and let me know if anything needs to be corrected.
Batch.htm :-
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Batch Duration and Percent Analysis</title>
</head>
<script language="javascript">
//get all campaigns
function getCampaigns() {
document.CampaignApp.getQueryObject().setParam(1, document.LocationApp .getBrowserObject().getSelectedItem());
document.CampaignApp.refresh();
}
//get all batches
function getBatches() {
document.BatchDurationApp.getQueryObject().setParam(1, document.CampaignApp .getBrowserObject().getSelectedItem());
document.BatchDurationApp.refresh();
document.BatchDurationApp.updateGrid(true);
}
function openReport()
{
alert("selected item is "+document.BatchDurationApp.getGridObject().getSelectedCellValue(1));
document.BatchDurationApp.setPropertyValue("CampaignName",document.BatchDurationApp.getGridObject().getSelectedCellValue(1));
window.open("Trend.htm");
}
</script>
<body>
<table border="0" width="100%" id="table1">
<tr>
<td width="484">
<img src="performix.jpg" width="400" height="40" style="padding-left: 4px; padding-right: 4px; padding-top: 1px; padding-bottom: 1px">
</td>
<td width="584" align="left"><b>
<font size="5" color="#000080" face="Verdana">xMES ANALYTICS</font></b></td>
<td width="150">
<i><img border="0" src="xMII%20logo.PNG" width="151" height="41"> </i>
</td>
</tr>
</table>
<hr>
<table border="0" width="100%" id="table2" height="34">
<tr>
<td width="121" align="left" valign="top">
<font face="MS Sans Serif" size="2"><b>Select Location</b></font></td>
<td align="left" width="148">
<font face="MS Sans Serif" size="2">
<APPLET NAME=LocationApp WIDTH="143" HEIGHT="24" CODE="iBrowser" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
<PARAM NAME="QueryTemplate" VALUE="xmes/getAllLocationsQuery">
<PARAM NAME="DisplayTemplate" VALUE="xmes/locationBrowser">
<PARAM NAME="Param.1">
<PARAM NAME="SelectionEvent" VALUE="getCampaigns">
</APPLET>
</font>
</td>
<td width="131" align="left" valign="top">
<font face="MS Sans Serif" size="2"><b>Select Campaign</b></font></td>
<td align="left" width="823">
<font face="MS Sans Serif" size="2">
<APPLET NAME=CampaignApp WIDTH="156" HEIGHT="25" CODE="iBrowser" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
<PARAM NAME="QueryTemplate" VALUE="xmes/getAllCampaignsQuery">
<PARAM NAME="DisplayTemplate" VALUE="xmes/campaignBrowser">
<PARAM NAME="Param.1" VALUE="0">
<PARAM NAME="SelectionEvent" VALUE="getBatches">
</APPLET>
</font>
</td>
</tr>
</table>
<table border="0" width="100%" id="table5">
<tr>
<td height="458">
<APPLET NAME="BatchDurationApp" WIDTH="600" HEIGHT="400" CODE="iGrid" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
<PARAM NAME="QueryTemplate" VALUE="xmes/batchDurationQuery">
<PARAM NAME="DisplayTemplate" VALUE="xmes/batchDurationDisplay">
<PARAM NAME="Param.1" VALUE="0">
</APPLET>
</td>
</tr>
<tr>
<td>
<input type = "button" value="Open Report!" name="B1" onclick="openReport()">
</td>
</tr>
</table>
</body>
</html>
Trend.htm :-
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Trend Chart</title>
</head>
<script language="javascript">
function showTrend()
{
var CampaignName = document.TrendChart.getPropertyValue("CampaignName");
alert("Campaign Name "+CampaignName );
document.TrendChart.getQueryObject().setParam(1,CampaignName);
document.TrendChart.getChartObject().setTitle("Trend for Batch : " + CampaignName);
document.TrendChart.refresh();
}
</script>
<body onload="showTrend()">
<table border="0" width="100%" id="table5">
<tr>
<td height="458">
<APPLET NAME="TrendChart" WIDTH="400" HEIGHT="300" CODE="iChart" CODEBASE="/Illuminator/Classes" ARCHIVE="illum8.zip" MAYSCRIPT>
<PARAM NAME="QueryTemplate" VALUE="xmes/batchDurationChartQuery">
<PARAM NAME="DisplayTemplate" VALUE="xmes/batchDurationChartDisplay">
<PARAM NAME="Param.1" VALUE=""> <PARAM NAME="Title" VALUE="Trend for : ">
</APPLET>
</td>
</tr>
</table>
</body>
</html>
Regards,
Lipsa.
Hi,
Now, I have exchanged the query.
In Batch.htm file, I have a function openReport().
function openReport()
{
alert("selected item is "+document.BatchDurationApp.getGridObject().getSelectedCellValue(1));
document.BatchDurationApp.setPropertyValue("CampaignName",document.BatchDurationApp.getGridObject().getSelectedCellValue(1));
alert("Campaign name is "+document.BatchDurationApp.getPropertyValue("CampaignName"));
window.open("Trend.htm");
}
1. In the first alert statement, it displays the item which i select from the grid.
2. In the next statement, I am setting the property value. I am assigning the selected item to "CampaignName" using setPropertyValue().
3. In the third statement, I am printing the set value using getPropertyValue("CampaignName") through an alert statement.
But this alert statement is not showing me the value which I had set in the second step.
So, the setPropertyValue() is not setting the value.
And in the Sun Java Console,
I can see the following error :-
ERROR - Error Setting Property CampaignName to PHN06
ERROR - No properties were set, invalid session
Can you please tell me the reason??
Thanks,
Lipsa.
Hi Lipsa,
I checked your code , I don't know why it is not getting value.
Check with this code in Trand.htm file
function showTrend()
{
var BatchNo = document.TrendChart.getPropertyValue("BatchNo");
document.TrendChart.getQueryObject().setParam(1,BatchNo);
document.TrendChart.getChartObject().setTitle("Trend for Batch : " + BatchNo);
document.TrendChart.refresh();
}
-Vijaya
Lipsa,
I saw in a previous statement that you said the webpage you were hittins was http://localhost/. when using reports you cannot use localhost you need to actually log into the system for the session parameters to be used. This would be why your setPropertyValue() would not be working try logging in to the server such as http://<CPU Name>/WebPage you should receive a login page and from here try http://<CPU Name>/PropertyAccessServlet?Mode=List and this should list all of your live session variables once you use the setPropertyValue() that value will then be in that list as well.
Erik
search the forums, this question has been answered more than once here already.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.