Session variables dropping

I've been having this problem for a long time so I thought
I'd post again and maybe get a hit this time.
We run off windows cfmx 7.x now fully patched, prior to that
we were on cfmx 6.x. We use session management only. Many times on
a new page hit the user loses about half of their session variables
up to all of them. Typically we have them test on the same machine
using different browsers. 99% of the time switching from IE to
firefox solves the problem, most of the users have had IE 6.x.
I experienced this problem myself for about 4 months time and
I could reproduce it daily when neccessary by simply opening a new
window to our application and the session information would persist
to the new window but the parent window would receive a new cfid
and lose all session information. New windows aren't the only
issue, we see a lot of lost session variables in one click, same
window, functionality. I've had hooks in place to test if the
domain was different on page hits removing the www or something but
so far have not found anything there. Each time a new CFID is being
issued and they are losing the original. We attempted to put CFID's
in the URL at all times but that leads to other issues and didn't
solve the problem for us anyhow.
This has been a serious issue for awhile and browsing these
forums I see others are experiencing it to some extent too. I'm
wondiner if anyone has any tips or can confirm the CF Admin/app.cfc
setup you use if you're not seeing any problems like this.

right... response.sendRedirect(). sendRedirect works by sending a repsonse to the browser with a location header. The browser sees that header and makes a new, separate request to the new location. It's no different then typing the location in the location bar in the browser or clicking a link.
But that doesn't matter. If you have 2 web applications (aka 2 servlet contexts) on the server, they are not going to share sessions between them. So the first page is working off one session in one context with some ID. Then the redirect sends it to another page in a different context. That session ID is not valid in that 2nd context, so a new session is created like it was a first time user. And if you redirect back, you may not get the same session for the first context, unless the session ID cookie defines the path as well (I'm not sure offhand).
The "application" object is the servlet context, specifically a javax.servlet.ServletContext object (or implementation of the interface, technically). Nothing is shared between contexts.
Now, you can always share things in one way or another. Store things in a database or in files. Use a messaging system like SOAP or JMS. Maybe the server allows for contexts to access each other (they aren't shared in that case, just that you can get a named context and read what's stored in it).
Or don't have your separate contexts, use subdirectories in the same context.

Similar Messages

  • How to store session variables in drop down menu (and radiobutton/checkbox)

    How am I going to store session variables in the drop down menu, radio button, checkbox.
    In text area, I do like below:
    <input type="text" name="membershipno" size="5" maxlength="50" value="<%=((session.getValue("Smembershipno")!=null)?session.getValue("Smembershipno"):"") %>">
    Any idea?

    Hi jeffkyt79, I could have answered this on Expert's Exchange. But I suppose it would be hard as the site is down right now :-(
    Here is sample code for the form:
    <form action="" name="form1">
    <input type="text" name="field1" value="<%
    if (session.getAttribute("field1")!=null) {
    out.println(session.getAttribute("field1"));
    } %>"><br>
    <input type="text" name="field2" value="<%
    if (session.getAttribute("field2")!=null) {
    out.println(session.getAttribute("field2"));
    } %>"><br>
    <input type="text" name="field3" value="<%
    if (session.getAttribute("field3")!=null) {
    out.println(session.getAttribute("field3"));
    } %>"><br>
    <input type="checkbox" name="check1" value="tick"<% if (session.getAttribute("check1")!=null) out.println(" checked"); %>><br>
    <% String selRadio=(session.getAttribute("r1")!=null)?(String)session.getAttribute("r1"):""; %>
    <input type="radio" name="r1" value="yesdot"<% if (selRadio.equals("yesdot")) {out.println(" checked");} %>>
    <input type="radio" name="r1" value="nodot"<% if (selRadio.equals("nodot")) {out.println(" checked");} %>><br>
    <select name="sel">
    <% String selOption=(session.getAttribute("sel")!=null)?(String)session.getAttribute("sel"):""; %>
    <option value="option1"<% if (selOption.equals("option1")) {out.println(" selected");} %>>OPTION 1
    <option value="option2"<% if (selOption.equals("option2")) {out.println(" selected");} %>>OPTION 2
         <option value="option3"<% if (selOption.equals("option3")) {out.println(" selected");} %>>OPTION 3
    </select>
    </form>
    And here's the revised javascript function to put in form1.jsp:
    function newWin() {
    f=document.form1.elements;
    str="?";
    mypage="test2.jsp"; // I've hardcoded the url for testing but you can fix this
    for (i=0;i<f.length;i++) {
    if (f.type=="text") {
    if (f[i].value!="") {
    str=str+f[i].name+"="+f[i].value+"&";
              continue;
         if (f[i].type=="checkbox"||f[i].type=="radio") {
         if (f[i].checked) {
         str=str+f[i].name+"="+f[i].value+"&";
         if (f[i].type=="select-one") {
         str=str+f[i].name+"="+f[i].options[f[i].selectedIndex].value+"&";
    str=str.substr(0,str.length-1);
    // now open the popup
    mypage+=str;
    win=window.open(mypage, 'myname'); // I've left out the winprops but you can fix this
    If you can ask any more questions, could you do it on EE (if possible!!). I know this works because I've tested it.

  • Flash Menus cause my session variables to drop or not show temporarily until I refresh the page

    I have a login routine that once a user logs into teh site it
    creates a session variable. I have used this same script many times
    without any problem but I now have Flash menus and it seems that
    after logining in (session created) I will click on a menu item and
    the debugging shows that the session variable isn't there. If I hit
    the REFRESH button on the browser it appears.
    Has anyone gotten this and know a way to get around it. I
    have 5 pages I need for a user to navigate to after loging in but
    the initial load doesn't seem to have the session set even though
    it was set when they logged in but a REFRESH of each page
    individually now has the variable.
    Any Ideas...Is this something with Flash menus or
    something?

    Problem is solved by removing these 2 lines from iframe.html
    if(navigator.appName=="Microsoft Internet Explorer")
    document.location.replace("");

  • Session variable size limitation (LV Webservices)

    Hi community,
    I read couple dozen email addresses from an XML and trying to write them into a session variable. The email addresses are comma separated and have a total string length of about 1100 characters. When I try to write it into a session variable LabVIEW drops an error message (-67158).
    It is very clearly related to the size of the string as if use lets say only 200 characters I dont receive the error message.
    How can I get rid of this limitation?
    Thanks!

    I am writing a general purpose webpage where I need email notifications. I have the workaround ready (before I send out the emails I dont read the emails from a session, but using the userID stored in the session to read the email from the xml). But generally having this limitation is annoying and unnecessary as normally you easily can store 100kB in one session. (probably even more, but that was the max I have ever did)

  • Session Variable in filter view error

    Hello,
    My prompt is defaulted to current 12Weeks. I used session variable in the prompt to capture 12 Weeks (Current Week and Current+12).
    so the default value is @{biServer.variables['NQ_SESSION.PERIOD_STDATE']} where PERIOD_STDATE is my session varible.
    I am using a filter view to display the filters being applied.
    When the user opens a tab, the filter view is throwing error
    ***The syntax of the expression to be evaluated is invalid.***
    ***Expression: @{biServer.variables['NQ_SESSION.PERIOD_STDATE']}***
    My report is running fine. I just have the date column as prompted in my report request.
    When the user hits go button on the prompt then the filter view comes up just fine.
    What is that I am doing wrong? Why does the filter view gives result after hitting GO button?
    Please help.
    thanks,
    deep

    Hi,
    1. Set the default using logical SQL. Select <presentation table>.<presentation column> from <subject area> where <presentation table>.<presentationation column> =valueof(NQ_SESSION.<session variable>)
    2. You dont have to write the exact syntax for entering the session variable in the default values. You just need to use the session variable name after selecting the session variable type in the drop down.
    Hope this helped/ answered.
    Regards
    MuRam

  • How to default bind variable using session variable at run time

    Hi All,
    I have a requirement where all VO queries (multiple VOs) produce only records that meet a certain value.
    For example, I have three tables with 3 VOs and each of them has a one-to-many relationship to another table (let's call it ref table and this table has a field called release). One of the 3 VOs is a parent/master table, and the other two are child tables. I created a VO for master table that linked to the ref table and created a view criteria using the release (use bind variable) field from the ref table. The other child tables have their own VO that has view criteria that also linked to ref table using the release field.
    On the UI page, I created a query component and a table from the master table VO. I also dropped the child table VOs in a tabbed panel which partial triggered by the master table. When I ran a query for a 'release' (hint: ref table value), the table for master table was filled the correct records that meet the criteria. Unfortunately, the child tables were not correct due to the query didn't use the bind variable that filter only records for the same 'release' value as the master table.
    The question is how do I 'default' or dynamically set the bind variable on the child tables based on the selection criteria from the query component. I am thinking to set a session variable from the query and use it in the bind variable in the child table, but not sure how to do it.
    Any suggestion how to do it or better solution to achieve the same effect?

    Hi,
    How about creating a custom AMImpl method, that takes parameters as required, and set the bind variables for all the desired VOs and perform executeQuery on them.
    You could expose this as client interface, and then use the method as parameter form.
    Check this thread for ex.
    Re: Setting Attribute in View Object through Managed Bean
    -Arun

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • Printing a Web Report Using Firefox Results in Lost Session Variables

    Post Author: AVXFlyer
    CA Forum: .NET
    I'm  having a problem with Firefox users printing a Crystal Report from a web site. 
    The first page of the web site collects information to be used in the report generation, for example, start date, end date, type of report etc.  These are all various text boxes, drop down lists, radio buttons and check boxes.  When the user clicks to show the report, everything works fine and the first page of the report will display. The code behind this page takes care of saving al the session variables into hidden fields on the page so the settings will be accessible when the user clicks to view the next page of the report.
    On clicking to view the next page of the report, everything is still fine and the process works beautifully and I've had no problems. 
    A new problem has surfaced during the printing of these reports.  Users who use IE6.0 or IE 7.0 do not have a problem, however, users who use Firefox do have a problem.
    It seems that the print dialog which appears as part of the the Crystal web control manages to 'lose" the variables which were present on the calling page.  It only does this with the Firefox browser.  Calls on postback to retrieve the variables from the hidden fields result in 0's or empty strings ("").
    Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init .... ....  If Me.IsPostBack = False Then ... ...        strDiscontinuedOnly = Request.Form.Item("ddlInvStatus")             If strDiscontinuedOnly = Nothing Then                 isDiscontinuedOnly = False             Else                 Select Case strDiscontinuedOnly                     Case 0 'All Inventory                         isDiscontinuedOnly = False                     Case 1 'Discontinued Inventory                         isDiscontinuedOnly = True                     Case 2 'Active Inventory                         isDiscontinuedOnly = False                 End Select             End If Else 'Postback is true             intRequestedReport = Request.Form.Item("fldReportID")             strDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly")             isDiscontinuedOnly = Request.Form.Item("fldInvDiscItemsOnly") ... ... end if

    Can't explain it, but here are a few tests;
    1) Try to print a saved data report
    2) Try to print a report that is not using parameters
    3) Try a different printer driver as "default"
    4) Enable the option "Dissociate Formatting Page Size and Printer Paper Size" on the report
    5) What format do you export to?
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]

  • Filter recordset with session variable

    This has never happened to me before, but for some reason, my
    recordset that drives a dynamic table won't filter results based on
    a session variable. I know session variables are working because I
    have the session variable echo on the page (dragged-n-dropped my
    session variable from the Bindings panel to my page), and that
    works fine. So why can't I filter my recordset with the same
    session variable??? What's going on?
    PS: I've attached my result page's code to this
    message.

    Gabe the Animator wrote:
    > <?php require_once('Connections/sales.php'); ?>
    > <?php
    > if (!function_exists("GetSQLValueString")) {
    > function GetSQLValueString($theValue, $theType,
    $theDefinedValue = "",
    > $theNotDefinedValue = "")
    > {
    > $theValue = get_magic_quotes_gpc() ?
    stripslashes($theValue) : $theValue;
    >
    > $theValue = function_exists("mysql_real_escape_string")
    > mysql_real_escape_string($theValue) :
    mysql_escape_string($theValue);
    >
    > switch ($theType) {
    > case "text":
    > $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    > break;
    > case "long":
    > case "int":
    > $theValue = ($theValue != "") ? intval($theValue) :
    "NULL";
    > break;
    > case "double":
    > $theValue = ($theValue != "") ? "'" .
    doubleval($theValue) . "'" :
    > "NULL";
    > break;
    > case "date":
    > $theValue = ($theValue != "") ? "'" . $theValue . "'" :
    "NULL";
    > break;
    > case "defined":
    > $theValue = ($theValue != "") ? $theDefinedValue :
    $theNotDefinedValue;
    > break;
    > }
    > return $theValue;
    > }
    > }
    >
    > $colname_rsSales = "-1";
    > if (isset($_SESSION['state'])) {
    > $colname_rsSales = $_SESSION['state'];
    > }
    > mysql_select_db($database_sales, $sales);
    > $query_rsSales = sprintf("SELECT * FROM sales WHERE city
    = %s",
    > GetSQLValueString($colname_rsSales, "text"));
    > $rsSales = mysql_query($query_rsSales, $sales) or
    die(mysql_error());
    > $row_rsSales = mysql_fetch_assoc($rsSales);
    > $totalRows_rsSales = mysql_num_rows($rsSales);
    >
    > session_start(); ?>
    The issue is that PHP doesn't "work" with session values
    until the session has started, and that must be done on each page,
    and must be done in the code *above* any reference to a session
    variable. The code you posted has the session_start() after it
    tries to use the session value ito filter the recordset. So move
    this last line of code ( session_start(); ) above $colnam_rsSales =
    "-1". Better yet, use:
    if(!session_id()){
    session_start();
    To prevent some versions of PHP from generating a
    warning/notice if you've called session_start() on the page already
    and you call it again.
    Danilo Celic
    | Extending Knowledge Daily :
    http://CommunityMX.com/
    | Adobe Community Expert

  • Filtering recordset with session variable

    This has never happened to me before, but for some reason, my
    recordset that drives a dynamic table won't filter results based on
    a session variable. I know session variables are working because I
    have the session variable echo on the page (dragged-n-dropped my
    session variable from the Bindings panel to my page), and that
    works fine. So why can't I filter my recordset with the same
    session variable??? What's going on?
    PS: I've attached my result page's code to this
    message.

    Actually, problem solved. I moved " session_start()" above
    "$colname_rsSales = "-1" ", which did the trick.

  • How do i filter recordsets using session variable???  Please help this is driving me mad...!!

    I am having the same problem as user "Gabe the animator" in a post sent in 2007.
    "my recordset that drives a dynamic table won't filter results based on a session variable. I know session variables are working because I have the session variable echo on the page (dragged-n-dropped my session variable from the Bindings panel to my page), and that works fine. So why can't I filter my recordset with the same session variable???"
    here is the code:
    <?php require_once('Connections/mockconn.php'); ?>
    <?php
    session_start();
    ?>
    <?php
    if (!function_exists("GetSQLValueString")) {
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
      if (PHP_VERSION < 6) {
        $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
      $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
      switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;   
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      return $theValue;
    if(!session_id()){
    session_start();
    $colname_info = "-1";
    if (isset($_SESSION['email'])) {
      $colname_info = $_SESSION['email'];
    mysql_select_db($database_mockconn, $mockconn);
    $query_info = sprintf("SELECT name, last_name, email, password FROM registration WHERE email = %s", GetSQLValueString($colname_info, "text"));
    $info = mysql_query($query_info, $mockconn) or die(mysql_error());
    $row_info = mysql_fetch_assoc($info);
    $totalRows_info = mysql_num_rows($info);
    ?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>home</title>
    </head>
    <body>
    <div id="info">hello <?php echo $row_info['']; ?></div>
    <?php
    if (isset($_SESSION['email'])) {
              echo 'your email: '.' '. $_SESSION['email'] .' '.'good job';}
                        ?>
    </body>
    </html>
    PLEASE PLEASE HELP.... I have been at this for day's...
    how do I get the record set to filter based on the value of the session variable

    Sorry I forgot to mension the error I am getting?
    ( ! ) Notice: Undefined index: in C:\wamp\www\mock\home.php on line 59
    Call Stack
    Time
    Memory
    Function
    Location
    1
    0.0093
    389024
    {main}( )
    ..\home.php:0
    Why is this error coming up?

  • Session Variables Not Sticking

    We are having issue with Session variables sticking from page to page in our Admin area of our website. You can login, but as soon as you click on another link (or anything) they drop.  
    It's not a code issue because we have the same code on 2 other networks and it works fine. We also have the same code on our backup website on the same network and it works fine.  The backup is on a different server in a different location. So that's 3 networks the code is running fine on. It even worked on this network on the main website up until about 9 months ago. I've verified/reverified the code mutiple times. Something must have happened with security patches, some IIS setting, or other server related issue.  We are running 2003 Windows Server Edition SP2 and Coldfusion version 8,0,1,195765. 
    The browsers used are IE7 and IE8. I don't think it's a browser issue because I can open another tab in the same browser and login and stay logged in on the website on another network.  We have already gone into browser advanced settings to make sure session variables are allowed. We've also had a couple of other admins look at it from various locations throughout the Country and they also cannot stay logged in on our main site. They can all stay logged in on the backup site. 
    Frustrating beyond belief. I'm betting it's a Microsoft issue.  Anybody out there have a similar issue or know what it might be?

    I've experienced a similar problem with CF8 using IE8. I've narrowed it down to being cookie related which causes CF to loose the existing session and create a new session. For me, I can consistently duplicate the issue by having multiple tabs open to various sites and then accessing my site to login -- login is successful but the first page request is treated as unauthorized because the session is empty. If I shutdown and restart the browser and bring up only my site, everything works fine. And once I'm logged in, I have never lost a session by opening other tabs. And this has never failed using Firefox or Safari. What is very strange is that I have multiple sites using CF8 and CF9 and only one exibits this behaviour.

  • Missing session variables and multiple CFID/CFTOKEN

    We are using ColdFusion 9.0.1 and have recently started to experience some sporadic behavior in our applications. These applications have worked without error for over 6+ years and have not been modified during this time.
    Over the past couple of weeks, we have been receiving calls in regards to users not being able to login and receiving errors when performing various actions.  We have put troubleshooting measures in place that display values when this occurs.
    We have noticed that when the errors occur, there are multiple CFID/CFTOKEN COOKIE values. Additionally, session variables are being dropped (during simple tasks such as going from one screen to the next).  These errors do not occur for the majority of users and have primarily occurred in Internet Explorer, but we have had some instances in other browsers.  In most instances, if the user switches browsers, the same application works fine for them.
    In one particular case, we have a <cfif> tag in the application.cfm file that checks for “session.user_id”.  If it doesn’t exist, the user is directed to a login page using the <cflocation> tag. When experiencing the problem, users are continuously going back to the login screen because the system is saying that the session variable does not exist.
    When working with one user who was experiencing this problem, we were able to remedy the problem by adding “addtoken=’yes’” to the cflocation tag.  ** We do not prefer to do this for security reasons.
    Rather than go through each application and try to “band-aid” each instance that occurs, can anybody offer some suggestions on why this behavior recently began and how we may be able to globally address it?

    My immediate guess is that there is faulty logic in the code that updates the value of session.user_id. Apparently, one of the following scenarios might be happening.
    Coldfusion creates a session, X, say. Session.user_id is as yet undefined, so ColdFusion cflocates the user to the login page. The user logs in, still within session X. His session.user_id is set.
    Suppose, for whatever reason (and I know of at least two), the session drops. The user's very next request will make ColdFusion to create a new session, Y, say. Under session Y, the variable session.user_id, which corresponded to session X, will no longer exist. So ColdFusion cflocates the user to the login page. This cycle will of course repeat if left uncorrected.
    Another possible scenario is that the variable session.user_id is not set at all, or is set in the context of a new session. I am assuming that the login page is a form. Then login validation occurs at the action page of the form. Presumably the variable session.user_id is set at this action page. If so, then perhaps ColdFusion fails to set this variable, or a new session is created as the request goes from the login-form page to the action page.
    The 2 main reasons why a session drops are 1) it times out, 2) a new request starts a new session. Hence the following suggestions.
    1) Is your sessionTimeout value low, say, just a few minutes? If so, increase it to 20 minutes.
    2) Remember that the default behaviour of ColdFusion is to start a new session at every request. Use cflogin and cfloginuser together with loginStorage="session". Cflogin executes only if there is no logged in user, irrespective of the session. Therefore, getAuthUser() is a better authentication test than session.user_id.
    3) Use Application.cfc in place of Application.cfm. In particular, the CFC offers you more fine-grained control over the beginning and end of sessions.

  • User Session Variable

    I'm new in php, I recently created login user name and
    password, is works great, and now I want to work on member update
    record.
    I'm trying to understand how to develop that using session
    variable in dreamweaver. I have two pages, the first page login.php
    where to login, and then redirect to second page member-profile.php
    which is member forms where to retrieve member information from
    mysql database using session variable and then update profile into
    the database.
    Does anyone know where i can learn sample of how to create
    update recorde using session variable! or can anyone explain how to
    write that in php code!
    please.. thanks.
    AM

    in the prompt for the user region or department, select SQL results for 'show' and 'report defaults' and write something like this:
    SELECT field exp FROM ... WHERE Employee.Alias = VALUEOF(NQ_SESSION.USER_ALIAS)
    this will give the right level of info and the user won't need to select it from the drop-down value.
    generally, when you select SQLresults for show, you get the SELECT and the FROM clause. Just add the WHERE clause and it should run properly.
    in the above example, I have assumed region/dept coming Employee dimension

  • To pass new session variable value to stored proc before running a report.

    Hi,
    Below is summary of the report requirement -
    Database level design
    1. Created a view and a global temporary table (GTT)
    2. Created an Oracle package procedure to accept from and to business dates on basis of which it will fetch, process and populate the GTT.
    Repository level design
    1. Created a business model containing the view and the GTT (mentioned above)
    2. Created two SESSION variables "from_dt" and "to_dt" to be initialized by their respective init blocks. Each of the variable is initialized with a DATE column value (of type DATETIME) from a database lookup table. I have also set the option "Enable that variable to be set by any user" for both variables.
    Query for these variables :
    from_dt = select from_date from <table>
    to_dt = select add_months(from_date,12) from <table>
    Presentation level design
    1. Using a text box, i display the default/initialized values of these variables like this -
    Current business date:@{biServer.variables['NQ_SESSION.from_dt']} Future business dt:@{biServer.variables['NQ_SESSION.to_dt']}
    Dates get displayed in YYYY-MM-DD 00:00:00 format
    The text msg displays these default dates and allows the user to specift different date range for which i create prompts as shown below.
    2. Using any random two columns of date type from the business model, i create two date dashboard prompts with labels "From Dt" and "To Dt".
    i select Calender Controls for both; setting Default To = Report Defaults.
    The Set Variable is set to Presentation variables - such that pv_from_dt maps to "From Dt" and pv_to_dt maps to "To Dt".
    3. i create the report using the business model created above. In the report "Advanced Tab" => "Prefix" field i specify the following -
    SET VARIABLE from_dt='@{pv_from_dt}',to_dt='@{pv_to_dt}';
    Note : The logic here is to display the default dates and allow user to specify different date values which will be stored in presentation variables.
    If the user does specify different "from dt" and "to dt" values, then using the presentation variables, i want to "write" back these new values to the corresponding session variables mentioned above.
    If the user does not specify different date range, then the default/initialized dates must be considered.
    I also display the default and new date values in the report title.
    Back to Repository level design
    To execute the stored procedure that will load the GTT before running the report I need to pass two date parameters to the stored procedure on basis of which it will fetch data, process and populate the GTT.
    In the Connection Pool --> Connection Script Tab --> Execute before query, I wrote the below query using the repository variables FROM_DT and TO_DT to execute the procedure -
    DECLARE
    v_from_dt date;
    v_to_dt date;
    BEGIN
    v_from_dt := VALUEOF(From_Dt);
    v_to_dt := VALUEOF(To_Dt);
    package_name1.package_body(v_from_dt,v_to_dt);
    END;
    Now when i try to run the report i get the following error :
    [nQSError: 10058] A general error has occurred. [nQSError: 23006] The session variable, NQ_SESSION.to_dt, has no value definition. (HY000)..
    Need help on this.
    Is it possible to "write back" a new value to a session variable ?
    Any other alternatives.
    Thanks
    Nusrat
    Edited by: user10309945 on Jan 24, 2011 10:08 PM

    Sandeep, I found a several topics where users describe saving values in DB through stored procedure or function. For example, [How to store OBIEE presentation level variable values in DB |http://forums.oracle.com/forums/thread.jspa?threadID=892006] I tried it and get an error
    *10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 17001] Oracle Error code: 14551, message: ORA-14551: cannot perform a DML operation inside a query ORA-06512*
    It's not a BI error. This error are generated by Oracle DB. If I write next:
    SELECT MyPLSQLFunction(p1,p2) FROM DUAL
    I get the same error.
    Oracle doesn't allow DML operations in SELECT.
    Did you relalize this feature yourself? Where did I mistake?

Maybe you are looking for

  • Cocoa Class for Smooth View Overlay

    I'm looking for a Cocoa class to perform a common window behavior. I don't know what to call the behavior so I will give two examples. 1) In iTunes when you click the 'song artwork and video viewer' button a 'Now Playing' view gradually appears below

  • Problem with firewire bus

    working in final cut pro,  when i now plug drives into to frontside firewire 800 port they are running very slowly and when playing a clip fcp freezes up and i have to force quit. when i plug the drives into the backside fw port or use on my macbook

  • Itunes library itl

    I've read solutions regarding the itunes library itl file and followed them. Now itunes loads but without my music. Can you please direct me to the solution? I'm sure it has been written about already but I cannot find it. Thanks very much.

  • ME22n and ME23n transaction need to show changes in item changes.

    Hi Experts, I need to show the changes of Shipping Point & Delivery Priority from T.Code ME22N & ME23N in Environment --> Item Changes menu path. (change log) How do i do this. these 2 fields are from EKPV table. please provide clue like exits to mak

  • Full database restoration

    Hi All, I am facing with typical problem with one of my db server.One db server has crashed for  some hardware reason.OS is linux. But there was no backup with that server.Database version is 11G.I have only physical files of database.Now I have both