Trouble setting the session state of a select item.

Hi,
I have a requirement whereby I need to change the session state of a select list item in my form without the need to submit. I am using Application Express 4.1.0.00.32. I thought this would be straight forward using a dynamic action or javascript and calling an on demand process for example.
P1_MY_SELECT onchange="set_option();"
function set_option() {
var l_option=$f_SelectValue('P1_MY_SELECT');
alert( 'My new value is ' + l_option );
// ON DEMAND Set the new session state value
var lRequest = new apex.ajax.ondemand
('SET_P1_MY_SELECT',function()
{  /* start the return function */
var l_s = p.readyState;
if(l_s == 1||l_s == 2||l_s == 3)
else if(l_s == 4)
{ gReturn = p.responseText;
     (gReturn)?json_SetItems(gReturn):null;
else{return false;}
/* end the return function */
lRequest.ajax.addParam('x01', l_option );
lRequest._get()
My on demand application process
DECLARE
l_options varchar2(2000) := wwv_flow.g_x01;
BEGIN
APEX_UTIL.SET_SESSION_STATE('P1_MY_SELECT',l_options);
apex_util.json_from_items('P1_MY_SELECT');
END;
Is there a better method to set the session state of my P1_MY_SELECT other than what I am doing as above or can you tell me why the session state of P1_MY_SELECT is not changed?
Thanks.
Edited by: 968358 on 01-Nov-2012 08:40

if you are on 4.1 why don't you use a dynamic action instead of writing the code again?
create a dynamic action like this
Event: Change
Source Type: Item
Item: P1_MY_SELECT
True Action:
=========
Action: Execute Plsql Code
Plsql Code: null;
Page Items to Submit: P1_MY_SELECT
Page Items to Return: P1_MY_SELECT (this is optional)
http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/advnc_dynamic_actions.htm#HTMDB27020

Similar Messages

  • Update Session State for only one item

    I have several hidden items (e.g. fund, object and unit) that hold values that are input parameters for a function that returns a SQL statement to a 'PL/SQL Function Body Returning SQL Query' region. These hidden items are set when a user selects a value from a pop-up tree. I want to dynamically set corresponding visible prompt text items (fund_prompt, object_prompt and unit_prompt) to a descriptive value that makes sense to the user. I've tried using a source type of SQL and placing the following SQL statement in the source
    SELECT child_prompt
    FROM fr_hierarchy_fund
    WHERE child = :FUND;
    When the value in one of the hidden items is changed, the visible prompt item displays "undefined" until the page is submitted.
    Is there a way to set the session state of an item without submitting the page?
    Thanks
    David

    David,
    Items, hidden or not, are not set in session state until the page is submitted. You might consider submitting the page with a javascript event on your popups. The request value can be used to control what processing you do or don't do on page submission and a branch right back to the page should allow you to show everything based on current item values.
    Scott

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • How to save the session states for a tabular form WITHOUT using check boxs?

    Greeting guys,
    As you know that we can use collections to save the session states of a tabular forms, described in the how-to doc of manual tabular forms. However, what I am trying to do ( or have to do) is to provide a manual tabular form, and save the session states for validation, without using the check boxes. Because a user can put contents into some columns in a row without checking the corresponding checkbox, according to the requirements. So basically what I tried is to loop over all the rows and save Every entry into a collection. However, sometimes I got "no data found" error with unknown reasons.
    My current solution is to use the "dirty" Retry button that gets back the history, which IMO is not a good workabout. So, I'd appreciate if somebody can shed some light on a better solution, especially if it is close to the one in that how-to doc.
    Thanks in advance.
    Luc

    The following is the first collection solutin I've tried:
    htmldb_collection.create_or_truncate_collection('TEMP_TABLE');
    for i in 1..p_row_num loop -- Loop on the whole form rows
    if (htmldb_application.g_f01(i) is not null) or (htmldb_application.g_f05(i) <> 0)
    --If either of them has some input values, the row should be saved into the colleciton.
    then
    htmldb_collection.add_member(
    p_collection_name => 'TEMP_TABLE',
    p_c001 => htmldb_application.g_f01(i),
    p_c002 => htmldb_application.g_f03(i),
    p_c003 => htmldb_application.g_f04(i),
    p_c004 => htmldb_application.g_f05(i),
    p_c005 => htmldb_application.g_f06(i),
    p_c006 => htmldb_application.g_f08(i)
    end if;
    end loop;
    Some of columns have null values, but I don't think that's the reason. Because once I clicked all the check boxes, there would be no error no matter what values were in other columns.
    Another issue would be extract the values FROM the collection, which has been tried because I had problem to store the data into the collection. I used "decode" functions inside the SQL to build the tabular form. I am not sure whether it will be the same as a regular SQL for a tabular form, like the example in the How-to doc.
    Also I didn't use the checksum, for it is not an issue at the current stage. I am not sure whether that's the reason which caused the NO DATA FOUND error.

  • How can I set the United States as my country when opening PSE 10?

    How can I set the United States as my country when opening PSE 10 so I don't have to scroll down every time?

    Why do you have to scroll down every time? You should only see the country window the very first time you launch PSE after installing it.

  • Setting the session when link is clicked in JSP

    I have a jsp page which recieves a Map from a java class function. It retireves the element from the map and displays it onto the page as a link. Now what I want to do is whenever any link is clicked then I want to put the map in the session. How can I do that in the same page????
    I do not want to already set the session becoz that gives me problem later on.

    Ok, I understand what you are trying to do now. Unfortunately, I still don't think you have much choice. Essentially you will only ever have 4 ways of persisting the data:
    1. In memory on the server (eg Session)
    2. On disk on the server (eg database)
    3. In memory on the client (eg Applet or maybe Javascript)
    4. On disk on the client (eg signed applet writing to local file system)
    The "standard" approach is to store all of this sort of stuff on the server, so you have a choice between 1 and 2.
    I assume your "Employee" data is in a database or LDAP directory? (or some form of "on disk" persistence), and you are querying this data store to populate the objects in memory?
    If so, there is a way you can avoid persisting in memory for a long time, but because you will have to persist "somewhere" you will only have option 2 left.. on disk.
    In the code where you initially retrieve the data from the data store for the first JSP, you can put the Map in the HttpServletRequest object rather than the session (request.setAttribute()), then access this in the first JSP to render the list. When you get to the second JSP however, this object will be out of scope and you won't have access to it anymore so you will have to query the datastore again for the specific record (based on an ID passed from the first JSP). So when you hit "back", the first JSP should execute again and requery the entire list again.
    This approach "shifts" the load from a memory load to a disk load (and you will also be affected by database performance issues), so you may not solve your performance desires.
    Alternatively, if the list of Employees is the same for all users (ie, it is an entire list and not a "filtered" list based on some search criteria), then you could store the list in memory at "application scope". Basically you would just load the Map on application start-up and put it into a static variable somewhere. I suspect this won't meet your needs as typically the list you generate would be based on a specific query (I am guessing here).
    All that being said, your concerns about memory usage and performance may be unwarranted. If you do some quick calculations about the memory usage of each Employee object, you may find it is a trivial amount. (Of course you won't be able to tell definatively how much memory it is using, but you may be able to hazard an educated guess). Remember also that things like Strings are "immutable" (never change) and are drawn from a "pool" of Strings. So, if you have two objects which contain the String "Java", they will actually both be using the same bit of memory.
    Also, a word of warning: If you choose to maintain your "in memory" model, you may run into concurrency issues. Consider the situation where the initial query generates a list of Employees. The user traverses the list looking at the details of each employee. Meanwhile, another user is changing the details of an Employee on disk, but the first user hasn't looked at the details of this Employee from their list yet. Because the list the first user is viewing is in memory, it won't reflect any alterations made since it was generated. So when the first user views the details of the Employee that the second user altered on disk, they will see the "old" details for that Employee.
    So, in summary the only two choices I can think of that are reasonable are:
    1. Keep things the same but don't destroy the Map in the session so the first page always has it, and suffer the memory issues. (remembering the warning above)
    2. Limit the scope of the data to the "request" only, and re-query every time. This will have poorer performance from a "response-time" perspective but avoids concurrency issues.
    My recommendation:
    If the list is "small" (sub 100 items), and you don't care about the risk of viewing "old" data, keep it in the Session. If the list is too big, perhaps you could look at only storing the first X number or records in the session and only displaying the first X number of records in the first JSP (like a search engine does)
    If the list is big, and/or you DO care about viewing old data, maintain the persistence on disk. If you choose this option, performance can be enhanced by using connection pools, stored procedures etc.
    At the end of the day, memory will only cause a performance issue if you "run out". Maybe the solution is to simply add more memory to the server?
    Hope some of this helps.

  • I have trouble setting the trash mailbox behavior. I have set it to delete every month but it has been keeping the trash mails for only about 10 days. Please help.

    I have trouble setting the trash mailbox behavior. I have had it set to delete the messages once a month. But lately it has been deleting my messages every 10 days. I have tried choosing different options to set the trash mailbox behavior but has not been successful. Is there anything I can do? Please help.

    Thanks for that advice @randers4.
    I linked through and submitted my info as a "topic not covered" in the iCloud section. After entering the serial number of my MBP it turns out I wasn't eligible for technical support (though I don't think this is hardware related support) and the final suggestion was to take my computer into an Apple store. I called my local Apple reseller and asked for assistance. The customer service rep was very nice but unable to help, so suggested I call Apple Support on 1300 321 456. I did so and, again, spoke to two very polite and helpful customer service people (I was transferred to security services). I didn't have to be on hold to speak to either rep for more than a few seconds! After trying a few different things, he worked out what was happening...
    So, to cut a long story short, to solve the problem in my OP, all I had to do was log out of iCloud in my System Preferences and log back in using my current Apple ID. [Edited to add that I had to sign out of everything I was currently signed in to with my Apple ID before logging out and in again.]
    Problem solved!
    Message was edited by: NotBaconBits

  • Error Deployer BEA-149231 Unable to set the activation state to true

    Hi Friends ,
    We are using weblogic 10.3.5.0, one of the deployment module is in failed status.
    In the application logs we could see the following error
    ERROR Util: Initial Spring Application Context creation failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datasource' defined in class path resource [spring.xml]: Invocation of init method failed; nested exception is javax.naming.NoPermissionException: User &lt;anonymous&gt; does not have permission on comp.env.cpt to perform lookup operation
    in the weblogic server logs we could find the follow error
    <24-Jan-2013 08:47:43 o'clock CET> <Warning> <HTTP> <BEA-101162> <User defined listener org.apache.myfaces.webapp.StartupServletContextListener failed: java.lang.ExceptionInInitializerError.java.lang.ExceptionInInitializerError
    at com.db.cpt.biz.Utilities.Util.<clinit>(Util.java:114)
    at com.db.cpt.web.listener.MyPhaseListener.<clinit>(MyPhaseListener.java:26)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
    Truncated. see log file for complete stacktrace
    Caused By: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'datasource' defined in class path resource [spring.xml]: Invocati
    on of init method failed; nested exception is javax.naming.NoPermissionException: User <anonymous> does not have permission on comp.env.cpt to perform lookup operation.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1170)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:427)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:249)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:155)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:246)
    Truncated. see log file for complete stacktrace
    Caused By: javax.naming.NoPermissionException: User <anonymous> does not have permission on comp.env.xxx to perform lookup operation.
    at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNamingNode.java:443)
    at weblogic.jndi.internal.ServerNamingNode.checkLookup(ServerNamingNode.java:423)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:180)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    Truncated. see log file for complete stacktrace
    >
    <24-Jan-2013 08:47:43 o'clock CET> <Error> <Deployer> <BEA-149231> <Unable to set the activation state to true for the application 'xxx'.
    weblogic.application.ModuleException:
    at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1510)
    at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:482)
    at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:425)
    at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
    at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:119)
    Truncated. see log file for complete stacktrace
    Caused By: javax.naming.NoPermissionException: User <anonymous> does not have permission on comp.env.cpt to perform lookup operation.
    at weblogic.jndi.internal.ServerNamingNode.checkPermission(ServerNamingNode.java:443)
    at weblogic.jndi.internal.ServerNamingNode.checkLookup(ServerNamingNode.java:423)
    at weblogic.jndi.internal.ServerNamingNode.lookupHere(ServerNamingNode.java:180)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:206)
    at weblogic.jndi.internal.BasicNamingNode.lookup(BasicNamingNode.java:214)
    Truncated. see log file for complete stacktrace
    Can you please advise us how can we resolve this issue which with i am struggling
    Raja

    Kumar,
    thanks for the update.
    we fixed the issue,
    for a particular user we didnt add his membership in a group in security realm, we added the user to a particular group, and then restarted weblogic, and deployed the module, and then status of deployment becomes successful.
    Raja

  • Get an set the SQL statement from a report at runtime

    i know there is an opportunity to filter the records by using setRecordSelectionFormula() method...but i wondered if you can anyhow get the whole SQL statement that is in the report. i think it would be very useful for many developers to maipulate the SQL directly like you were able to using the PE-functions in the old CRPE32.DLL...
    but in CR XI the CRPE32.DLL is no longer supported. now we have to substitute these functions with the JRC but i am not sure if it provides everything we had in the CRPE32.DLL...
    after all i do not understand why the CRPE32.DLL is still delivered but not supported. in my CR XI R2 installtion i found this file signed with version 11.5.3.438
    by the way it is a question of performance...a query would be faster if you could directly query the database by changing the reports sql statement instead of allowing the report to retrieve all data and then performing the filtering.
    so please, for the next version of the JRC give us the opportunity to get an set the sql statement of a report directly!

    Not an option. crpe32 is proprietory and the SQL we generate is to complex to assume it will be done correctly. Which is why the ability was removed

  • How to set the session using onClick event?

    Dear All,
    I have a link, which once the user click on it, I want to set the session.
    <a href="link.jsp" > Link </a>How to set the session? Where should I put <%session1.setAttribute ("test", "1234"); %>?
    Any idea?
    Thanks

    when u click on Link
    the control goes to link.jsp/.
    and in this page u can write the session related code.

  • Can someone tell me why this is not setting the session variable?

    first page
    <?php
    // script1.php
    session_start();
    echo "<form action=\"script2.php\" method=\"post\"
    name=\"name1\">";
    echo "Your name: <input name=\"name\" type=\"text\"
    size=\"20\" value=\"\">  ";
    echo "<input name=\"submit\" type=\"submit\"
    value=\"Submit\">";
    echo "</form>";
    ?>
    second page
    <?php
    // script2.php
    session_start();
    echo('Hello, ' . $_SESSION['name1']);
    ?>

    jlw12689 wrote:
    > second page
    >
    > <?php
    > // script2.php
    > session_start();
    > echo('Hello, ' . $_SESSION['name1']);
    > ?>
    You need to set the session variable first.
    <?php
    session_start();
    if (isset($_POST['name1'])) $_SESSION['name1'] =
    $_POST['name1'];
    echo 'Hello, ' . $_SESSION['name1'];
    ?>
    By the way, using echo to create your form on page one is a
    complete
    waste of time. Just use an ordinary HTML form - a lot less
    typing, and a
    lot more efficient.
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • Trouble using the "into" keyword in a select statement

    I was able to run the below query fine:
    SELECT QTTYP.Qt_Grp, 
    CFQR.ReferralCode, 
    CFQR.RecKey, 
    Count(CFQR.RecKey) AS Cnt
    FROM [HR_DEV_DM].[CFQ_TEST].CFQ_Referrals as CFQR 
    INNER JOIN [HR_DEV_DM].[CFQ_TEST].t_Qt_Typs as QTTYP 
    ON CFQR.QuoteType = QTTYP.Qt_Grp
    WHERE (((CFQR.QuoteType) Not In ('AUTO/CYCLE','COMMERCIAL','CYCLE')) 
    AND ((CFQR.QuoteDate)>=DateAdd("m",-15,CONVERT (date, GETDATE())))
    AND ((CFQR.RecCntdAsRefrl)=1))
    GROUP BY QTTYP.Qt_Grp, 
    CFQR.ReferralCode, 
    CFQR.RecKey, 
    CFQR.RecChangeID
    HAVING (((Count(CFQR.RecKey))>1) AND ((CFQR.RecChangeID) Is Null)) 
    OR (((Count(CFQR.RecKey))>1) 
    AND ((CFQR.RecChangeID) Not In (1035)))
    ORDER BY QTTYP.Qt_Grp, CFQR.RecKey;
    I am trying to add the output columns into a temp table. But when I add the "into" statement, as shown below, it gives me errors:
    SELECT QTTYP.Qt_Grp, 
    CFQR.ReferralCode, 
    CFQR.RecKey, 
    Count(CFQR.RecKey) AS Cnt
    FROM [HR_DEV_DM].[CFQ_TEST].CFQ_Referrals as CFQR 
    into I_Dup_RecKey_Check_01
    INNER JOIN [HR_DEV_DM].[CFQ_TEST].t_Qt_Typs as QTTYP 
    ON CFQR.QuoteType = QTTYP.Qt_Grp
    WHERE (((CFQR.QuoteType) Not In ('AUTO/CYCLE','COMMERCIAL','CYCLE')) 
    AND ((CFQR.QuoteDate)>=DateAdd("m",-15,CONVERT (date, GETDATE())))
    AND ((CFQR.RecCntdAsRefrl)=1))
    GROUP BY QTTYP.Qt_Grp, 
    CFQR.ReferralCode, 
    CFQR.RecKey, 
    CFQR.RecChangeID
    HAVING (((Count(CFQR.RecKey))>1) AND ((CFQR.RecChangeID) Is Null)) 
    OR (((Count(CFQR.RecKey))>1) 
    AND ((CFQR.RecChangeID) Not In (1035)))
    ORDER BY QTTYP.Qt_Grp, CFQR.RecKey;
    Errors:
    Msg 156, Level 15, State 1, Line 7
    Incorrect syntax near the keyword 'into'.
    Msg 102, Level 15, State 1, Line 11
    Incorrect syntax near 'CFQR'.
    Msg 102, Level 15, State 1, Line 18
    Incorrect syntax near 'Count'.
    Msg 102, Level 15, State 1, Line 19
    Incorrect syntax near 'Count'.
    Please help.....

    You have put INTO into the wrong place :
    SELECT QTTYP.Qt_Grp,
    CFQR.ReferralCode,
    CFQR.RecKey,
    Count(CFQR.RecKey) AS Cnt
    into I_Dup_RecKey_Check_01
    FROM CFQ_Referrals as CFQR
    INNER JOIN t_Qt_Typs as QTTYP
    ON CFQR.QuoteType = QTTYP.Qt_Grp
    WHERE (((CFQR.QuoteType) Not In ('AUTO/CYCLE','COMMERCIAL','CYCLE'))
    AND ((CFQR.QuoteDate)>=DateAdd("m",-15,CONVERT (date, GETDATE())))
    AND ((CFQR.RecCntdAsRefrl)=1))
    GROUP BY QTTYP.Qt_Grp,
    CFQR.ReferralCode,
    CFQR.RecKey,
    CFQR.RecChangeID
    HAVING (((Count(CFQR.RecKey))>1) AND ((CFQR.RecChangeID) Is Null))
    OR (((Count(CFQR.RecKey))>1)
    AND ((CFQR.RecChangeID) Not In (1035)))
    ORDER BY QTTYP.Qt_Grp, CFQR.RecKey;

  • Setting the sql statement

    http://www.egbolig.dk/drift_bo_syd.rpt (HERE IS THE REPORT)
    We are using SAP Crystal Report .NET Runtime files (http://scn.sap.com/docs/DOC-7824 newest version 13.0.9.1312) in our web asp.net application. Everything have been working fine, but we have can into problems when showing the certain kinda reports.
    In our code get the reports sql statement using getSQLStatement.
    Dim gp As New GroupPath() Dim sql As String = report.ReportClientDocument.RowsetController.GetSQLStatement(gp)
    This will get the sql, and we use this sql (getSqlStatement) and attach a sql WHERE clause from the code to only get a certain number of records.
    The report Drift_bo_syd.rpt has 5 tables, and the following sql statement. 
    Database/Show Sql Statement
    SELECT "rekvstam"."Sel", "rekvstam"."Afd", "rekvstam"."Levadresse", "rekvstam"."Rekvisition", "rekvstam"."Lejemaal", "rekvstam"."Lejer", "rekvstam"."Udfoertaf", "rekvstam"."Udfoertdato", "rekvstam"."Krit", "Selskab"."Adresse", "Selskab"."Postby", "Selskab"."Tlf", "Selskab"."Fax", "rekvstam"."Kontor", "rekvstam"."Hjemme", "rekvstam"."Rekvdato", "rekvstam"."Aftale", "rekvstam"."InitialRet", "rekvstam"."Arbejde", "kreditor"."Att", "rekvstam"."Konto", "Selskab"."Navn", "Selskab"."Email", "Interessentadresse"."Navn", "Interessentadresse"."Adresse", "Interessentadresse"."Postby", "Interessentadresse"."Email1", "Interessentadresse"."Telefon_Fax", "Interessentadresse"."Type", "Interessentadresse"."Tlf1", "rekvstam"."tlfLejer", "kreditor"."Kred", "Interessentadresse"."Interessentnr" FROM  (("Rekvstam" "rekvstam" INNER JOIN "Selskab" "Selskab" ON "rekvstam"."Sel"="Selskab"."Sel") LEFT OUTER JOIN "Kreditor" "kreditor" ON "rekvstam"."Kred"="kreditor"."Kred") INNER JOIN "Interessentadresse" "Interessentadresse" ON "kreditor"."Interessentnr"="Interessentadresse"."Interessentnr" WHERE  "Interessentadresse"."Type"='K' 
    But if we run the report from our asp.net code, we get the following error: 
    Cannot determine the queries necessary to get data for this report. Failed to retrieve data from the database. Error in File Drift_Bo_Syd {97FED382-1BAC-4DB1-970F-9E098ECE28F1}.rpt: Failed to retrieve data from the database.
    After a long time searching for a solution, we found out that if we place the column kred from the kreditor table on the report, the report will work. (field explorer / database fields / kreditor (table) / kred (column)
    Very important is that the field "kreditor.kred" is a primary key of the table kreditor, and also used in the linking.!
    (We can get the report to work if we call the sql statement with the "kreditor"."kred" in the SELECT statement.
    SELECT "kreditor"."kred", "rekvstam"."Sel", "rekvstam"."Afd", "rekvstam"."Levadresse", "rekvstam"."Rekvisition", "rekvstam"."Lejemaal", "rekvstam"."Lejer", "rekvstam"."Udfoertaf", "rekvstam"."Udfoertdato", "rekvstam"."Krit", "Selskab"."Adresse", "Selskab"."Postby", "Selskab"."Tlf", "Selskab"."Fax", "rekvstam"."Kontor", "rekvstam"."Hjemme", "rekvstam"."Rekvdato", "rekvstam"."Aftale", "rekvstam"."InitialRet", "rekvstam"."Arbejde", "kreditor"."Att", "rekvstam"."Konto", "Selskab"."Navn", "Selskab"."Email", "Interessentadresse"."Navn", "Interessentadresse"."Adresse", "Interessentadresse"."Postby", "Interessentadresse"."Email1", "Interessentadresse"."Telefon_Fax", "Interessentadresse"."Type", "Interessentadresse"."Tlf1", "rekvstam"."tlfLejer", "kreditor"."Kred", "Interessentadresse"."Interessentnr" FROM  (("Rekvstam" "rekvstam" INNER JOIN "Selskab" "Selskab" ON "rekvstam"."Sel"="Selskab"."Sel") LEFT OUTER JOIN "Kreditor" "kreditor" ON "rekvstam"."Kred"="kreditor"."Kred") INNER JOIN "Interessentadresse" "Interessentadresse" ON "kreditor"."Interessentnr"="Interessentadresse"."Interessentnr" WHERE  "Interessentadresse"."Type"='K'
    But it should not be necessary to include this field (which is the primary key and used in linking the report) in the sql statement,
    BECAUSE it is not used in the report. So maybe this is a bug?
    It has not been necessary in RDC Crystal Report or RAS Crystal Report in a classic asp envoriment.
    Here is the code we use to set the reports SQL Statement)
    Try
    Dim conn As New SqlConnection(connString)
    conn.Open()
    Dim sd As New SqlDataAdapter(New SqlCommand(nySQL, conn))
    Dim ds As New Data.DataSet()
    Dim navn As String = report.Database.Tables.Item(0).Name
    sd.Fill(ds, navn)
    report.SetDataSource(ds)
    conn.Close()
    Catch ex As Exception
    Throw
    End Try

    Hi Jan
    I understand your problem completely but we have asked  R&D to be able to edit the SQL and they explained due to how the report Engine works it's simply not possible anymore. It would take a complete rewrite in all of our DB drivers and query dll's to be able to allow it. They did that in CR 9 when they rewrote the DB drivers and removed the SQL part of the code into separate dll's and that is when the ability was removed, it's been that way ever since.
    One possibility is to get the SQL from the Report and then connect to your DB using a .NET and if the results from the SQL is less than 5K rows and not too many columns you could then set the Report data source to a Dataset.
    As long as all of the field names are the same CR will run the report using this work flow.
    For data larger than 5K rows, limit is due to memory resources, you could save the DS to an XML file and then set the reports data source to the XML file. We've seen 100meg XML's used so the amount of data should not be a problem, but of course there are limits to everything so test...
    This should not affect performance much.
    So the work flow would be:
    Load the report
    Get the SQL Statement
    Paste it into a Dataset Query
    Something like this should get you started:
    //string connString = "Provider=SQLOLEDB;Data Source=MySQLServer;Database=xtreme;User ID=sa;Password=pw";
    string connString = "Provider=SQLNCLI10;Server=MySQLServer;Database=xtreme;User ID=sa;Password=pw";
    Detail"".""Quantity"" FROM   ""xtreme"".""dbo"".""Orders Detail"" ""Orders Detail""";
    string sqlString = @"SELECT top 10*  FROM  ""xtreme"".""dbo"".""Financials"" ""Financials""";
    System.Data.OleDb.OleDbConnection oleConn = new System.Data.OleDb.OleDbConnection(connString);
    System.Data.OleDb.OleDbCommand cmd = oleConn.CreateCommand();
    cmd.CommandText = sqlString;
    System.Data.DataSet ds = new System.Data.DataSet();
    OleDbDataAdapter oleAdapter = new OleDbDataAdapter(sqlString, oleConn);
    //OleDbDataAdapter oleAdapter2 = new OleDbDataAdapter(sqlString2, oleConn);
    DataTable dt1 = new DataTable("Financials");
    //DataTable dt2 = new DataTable("Orders Detail");
    oleAdapter.Fill(dt1);
    //oleAdapter2.Fill(dt2);
    ds.Tables.Add(dt1);
    //ds.Tables.Add(dt2);
    ds.WriteXml("c:\\reports\\sc2.xml", XmlWriteMode.WriteSchema);
    // as long as the field names match exactly Cr has no problems setting report to a DS.
    try
        rpt.SetDataSource(ds.Tables[0]); // incremtent [0] for more than 1 table.
        rpt.SetDataSource(ds);
    catch (Exception ex)
        MessageBox.Show("ERROR: Schema Mismatch. Error reported by CR: " + ex.Message);
    //Now check for subreport and set to same DS
    foreach (CrystalDecisions.CrystalReports.Engine.Section section in rpt.ReportDefinition.Sections)
        foreach (CrystalDecisions.CrystalReports.Engine.ReportObject reportObject in section.ReportObjects)
            if (reportObject.Kind == ReportObjectKind.SubreportObject)
                CrystalDecisions.CrystalReports.Engine.SubreportObject subReport = (CrystalDecisions.CrystalReports.Engine.SubreportObject)reportObject;
                CrystalDecisions.CrystalReports.Engine.ReportDocument subDocument = subReport.OpenSubreport(subReport.SubreportName);
                subDocument.SetDataSource(ds);
    And for XML it would use this part, not above I am saving the data and structure in the XML file so it should match what is in the report:
    foreach (CrystalDecisions.CrystalReports.Engine.Table rptTable in rpt.Database.Tables)
        try
            rptTable.Location = btrDataFile.ToString(); // @"D:\Atest\" + rptTable.Location + ".xml";
        catch (Exception ex)
            MessageBox.Show("ERROR: " + ex.Message);
    Only issue you may run into is sometimes XML does not have a direct field type and your original data source but you'll get an error if that happens which could be trapped and handled.
    If you have a report that only uses 2 tables I do have code that will convert it to use a Command Object. That is the limit the engine is capable of, there is a lot of logic to be able to do this in CRD and the SDK so that is all we could get for now.
    I hope that helps
    Don

  • Nothing set in session state after upgrade to 4.0.2

    hi -- I just patched up to 4.0.2 from 4.0.1. When I run my applications (any of them) nothing is showing
    in session state -- application items or page items. I don't think it's just an issue w/ the "session"
    reporting functionality because I'm also getting errors that indicate that values are not being set.
    Unfortunately, I did not export applications before the upgrade, or back up the database (though we
    have one from last night...).
    Help? Just want my apps working again!
    Thanks,
    Carol

    hi -- Well, you're on target:
    - I am using custom authentication (and apps that don't use it seem to work fine) - & -
    - The applications in question work fine when run directly.... that is, not via the developer.
    Unfortunately, I'm still having the problem after applying the patch. Actually, just once it did
    work... this was after I first applied the patch: I completely rebooted my machine and when I
    first went into the developer and ran it w/o doing anything else first, I didn't have the problem. Every
    time thereafter I have had the problem.... including after rebooting again.
    I have no reason to suspect the patch didn't work... very simple patch, no errors.
    For what it's worth... I can't say that I entirely tracked everything in the thread you pointed me to
    about sessions getting mixed up, but it does look like the session ids for developer vs the applications
    I'm running in developer are consistent throughout (at least, based on what I see in the URL). Is it
    normal that when I run an app via the builder, that the session_id that shows up on the login page
    is the developer session_id? A new session_id then shows when at the home page of the application...
    Any other ideas? Absolutely nothing is showing up in session state, anywhere. I'm very frustrated....
    I'm almost at the point where I want to use our latest database backup and revert back to 4.0.1. It doesn't
    have what I (apparently) need to get master/details working as I need them to, but at least I can proceed with
    other development!
    Hopefully there's an easier solution.
    Thanks,
    Carol

  • How can i set the session of a new window?

    I am placing in session an object from an action class like this request.getSession().setAttribute("currentBean",orderInfoModel.getDetails()); and i use it into a jsp page to print some informations. The page name is called orders.jsp where i use the object: <jsp:useBean id = "currentBean" scope="session" type="miru.orderInfo.OrderInfoBean"/> on that page i have a button and when i click it it opens me a new window(not a new tab) <input type="button" value="Edit" onclick="openWindow('http://localhost:8080/miru/scrisoareTransport.jsp','ScrisoareDeTransport',1150,600)">
    the jsp for the new window(scrisoareTransport.jsp) looks like this :
    <%@ include file="taglibs.jsp" %>
    <%@ page import="database.navigator.Navigator"%>
    <jsp:useBean id = "currentBean" scope="session" type="miru.orderInfo.OrderInfoBean"/>
    <html>
    </html>
    Because IE is starting a new session on new window i need to pass the session and probably the currentBean object from the parent page to the childpage and set the child page session with the one coming from the parent page
    Advices?
    10x

    well, the Gaussian window and the Gaussian Monopulse vis are good starting points,  I would start with the window vi, but with a shorter length and add zeros before and after to get the full window with the peak at the desired position.
    If
    Greetings from Germany
    Henrik
    LV since v3.1
    “ground” is a convenient fantasy
    '˙˙˙˙uıɐƃɐ lɐıp puɐ °06 ǝuoɥd ɹnoʎ uɹnʇ ǝsɐǝld 'ʎɹɐuıƃɐɯı sı pǝlɐıp ǝʌɐɥ noʎ ɹǝqɯnu ǝɥʇ'

Maybe you are looking for