cancel
Showing results for 
Search instead for 
Did you mean: 

getting session variables

Former Member
0 Kudos

Hi All

i am setting query parameter like this

window.open(http://<servername>/CompanyName/App1/mypage.irpt?OrderNum=123&RowNum=100).

How can i get the orderNum and rowNum in mypage.irpt

also how many query parameter i can set like( mypage.irpt?OrderNum=123&RowNum=100?........)

Thanks

Kartthi D.

Edited by: karthi D on May 8, 2009 9:44 AM

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Try like this:

To set the session property you use like this:

document.Appletname.setPropertyValue("OrderNum",value);

And to get the session value:

document.Appletname.getPropertyValue("OrderNum");

Hope this may help you.

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi Karthi,

In your code , you need not to give full address like "http://<servername>/CompanyName/App1" , you can just give name of your page "window.open(mypage.irpt?OrderNum=123&RowNum=100)"

If You are passing session variable thru an URL , then do as below

create variables say like

var OrderNum=123;

var RowNum=100;


var url="mypage.irpt?input1="+OrderNum+"&input2="+RowNum;
window.open(url);

In your irpt page you can get these values doing 2 steps.

1. You have to set param in any one of the applet u have in page like below


<Applet>
...Query
...Display
<Param name="Param.24" value="{input1}">
<Param name="Param.25" value="{input2}">
</Applet>

2. To get values of above params use below code using any applet


var OrderNo= AppletName.getQueryObject.getParam(24);
var RowNo= AppletName.getQueryObject.getParam(25);

which gets values to OrderNo and RowNo.

Only drawback is Applet has around only 28 or 29 params that you can set for, if u are passing within 29 params its not a problem.

Regards,

Padma

Edited by: Jeremy Good on May 8, 2009 4:09 PM

All query templates support 32 Param.x's.

Ya 32 Param.x's, Sorry dint check that, thought it has around 29.

Edited by: Rao on May 11, 2009 7:40 AM

former_member4529
Active Contributor
0 Kudos

Hi,

You can access the session variables as in the HTML. E.g.

<input type="text" value="{OrderNum}">

This way you can access the parameters passed in the URL as well as any HTML element (text, hidden, etc) present in the previous page. You need not use the getPropertyValue and setPropertyValue methods on the applets if you use this.

Thanks,

Dipankar

Former Member
0 Kudos

Hi,

You can use below mentioned to get values in irpt pages.

document.applet.getPropertyValue(1,Name);

You have to use the same applet name in irpt page too.

-Suresh Hiremath

Edited by: Jeremy Good on May 8, 2009 4:06 PM

Please disregard this response - the javascript method is incorrect and the sessions are not applet specific.