Trouble using an item variable in a report query

Hi,
Apex 4.2
Theme: jQuery Mobile
I have a page with 2 regions.  An html region with a select list that populates an item called P1_RESIDENT and below that a report region which will show rows dependent on what is selected in the above select list.
My select list definition is:
select aka as display_value, id as return_value
  from RESIDENT
order by 1
The query in my report is:
select decode (two_person_lift,'Y','2 Person Lift','1 Person lift') as "2 person lift"
from resident
where id = :P1_RESIDENT
My expectation is the user will select a person from the list and a name will be displayed and P1_RESIDENT will get set with the return_value of id.  The report region will then run and display rows.
Unfortunately all I am getting in the report region is this:
&"DECODE(TWO_PERSON_LIFT,'Y','2PERSONLIFT','1PERSONLIFT')".
What am I doing wrong ?
Thanks
Steve.

Suggest you try to reproduce the problem on apex.oracle.com where we can see it.
What page, region, and report templates are you using?
Are you submitting the page on change of the select list, or using a dynamic action to refresh the report? If the latter, provide full details of the DA, and Is P1_RESIDENT specified in the report region Page Items to Submit property?

Similar Messages

  • Issue with use of shared variables in Crystal Reports 2008 Offline Viewer

    Hi,
    I have a report that contains a number of sub-reports which include drill-down functionality. The report returns data relating to an individual team with the user being able to view top level summary information in each area from the parent report and then drill into the sub-reports to view see more detail. The data returned by the sub-reports is filtered, using sub-report links, based on the team code parameter value given by the user. This parameter field resides in the main report.
    One of the values returned by the main report is the team name. This is passed to each sub-report using a shared variable and each sub-report displays this team name as part of a heading.
    This all works fine in Crystal Reports 2008, but when a report, containing data, is opened using Crystal 2008 Offline Viewer there is a problem with the shared variable. The value is displayed correctly when the user initially drills into the sub-report. However, when the user begins to drill into grouped data within the sub-report the value passed to the sub-report using the shared variable disappears. 
    How can I ensure that, when a report is viewed using Crystal Offline Viewer 2008, the value within the shared variable is not lost when users drill into grouped data within sub-reports
    Thanks
    Stuart

    Please re-post if this is still an issue or purchase a case and have a dedicated support engineer work with you directly:
    http://store.businessobjects.com/store/bobjamer/DisplayProductByTypePage&parentCategoryID=&categoryID=11522300?resid=-Z5tUwoHAiwAAA8@NLgAAAAS&rests=1254701640551

  • How to use customer exit variable in the report

    Dear All,
    i want to use a standard customer exit variable in the report properties.
    In the Bex Query Designer right hand bottom you will find two buttons "Properties" and "Task". Click on task you will get different option. Choose properties from there and then select "variable sequence tab".
    I need to add a standard variable there. How can i achieve it?
    Appreciate your early help.

    You need to add variable to corresponding charctertic then you can get that varaible for sorting the sequence....
    If 0CUST is the varaible then you need to assign it 0CUSTOMER then 0CUST will be available for the sequence.
    Edited by: shanthi bhaskar on Apr 2, 2009 5:41 PM

  • Using a java variable in jsp-Reports?

    Hello everyone,
    is it possible to use a java variable in the xml-definition of a report? Something like
    <%@ taglib uri="/WEB-INF/lib/reports_tld.jar" prefix="rw" %>
    <% String someSqlStatement="select * from emp"; %>
    <rw:report id="myReport">
    <rw:objects id="myObjects">
    <report DTDVersion="9000010" name="myReport">
    <data>
    <dataSource name="Q_1">
    <select>
    <![CDATA[
    <%= someSQLStatement %>
    ]]>
    </select>
    It won't work that way (as the string is not evaluated and inserted into the definition, but how could it be done? Would be great to modify the report programatically that way? Any ideas?
    TIA,
    Marcel Jantz

    To pass values to Reports, you should use the "parameters" attribute in the <rw:report> tag. In the above case you would have:
    <% String myParameters="p_someSqlStatement=select%20*%20from%20emp"; %>
    <rw:report id="myReport" parameters="<%= myParameters %>">
    <rw:objects id="myObjects">
    <report DTDVersion="9000010" name="myReport">
    <data>
    <dataSource name="Q_1">
    <select>
    <![CDATA[ &p_someSqlStatement ]]>
    </select>
    The body of the <rw:objects> tag isn't evaluated since the Reports Builder needs to be able to open and load the <rw:objects> tag. As the Reports builder doesn't run the .jsp on open, it only parses it, the <rw:objects> tag can't have values that need to be evaluated.

  • Use of Presentation Variables in Navigated Report Title

    Hi All,
    It's regarding the presentation variable in report title. I have value interaction to another report based on Prompted values. But when we click on the value it will go to another report page and giving the results, but the title view is not changing as per the requested value. The title should change dynamically, but it is showing the P.Variables in place of prompted value.
    Below are the ways i have used the P.Variables:
    @{brand1} at @{customer}, @{sensitivity}% Sensitivity
    @{brand1}{'Prod'} at @{customer}{'CVS'}, @{sensitivity}{'15'}% Sensitivity -----(default values here)
    Version : OBIEE 11.1.1.5.0
    Could you provide me the solution for this issue.
    Thanks in Advance,

    Hi,
    You can use the presentation variable when you are passing the value from the prompt and filtering after
    clicking on the 'GO' or 'APPLY' button. So that assigns one value and is passed in the report in the
    page used.
    What you need to do is you need to have the 'is prompted' for the column used in the title
    or you can make the column is equal to @{pres_var}.
    But still if you dont use the columns in the report and you dont want to filter the report with the title columns
    then you can use narrative view with all the columns used in the title and have 'is prompted' and make its formatting similar to title view and save as a separate report
    And place the narrative view above the report
    Regards,
    MuRam

  • Using LIKE with a variable in a report query

    Probably an stupid question, but I can't find the answer on this forum or by trying. How do use LIKE and a variable together in a query?
    The following solutions don't work f.e.:
    LIKE :P310_ENTITEITID%
    LIKE ':P310_ENTITEITID%'

    Hi Elmo
    Try '%'||:P310_ENTITEITID||'%'
    Elsie

  • How to use a global variable for reading a query resultset in JDBC lookup?

    Hi Friends,
    Using JDBC lookup, I am trying to read from a table Emp1 using a user defined function. In PI 7.0, this function returns values of a single column only even if you fire a " Select * " query. I am planning to use a global variable(array) that stores individual column values of the records returned by a "select *" query. Need pointers on as to how a global variable can be declared and used to acheive the above scenario. Kindly explain with an example. Any help would be appreciated.
    Thanks,
    Amit.

    Hi Amit,
    Sounds like a good idea but then you would need an external db and update the table in a thread safe way !.
    Regarding your question as to how to work with global variable please refer https://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/1352. [original link is broken] [original link is broken] [original link is broken]
    Rgds
    joel

  • How To Use a Hidden Page Item within an SQL Report Query without Submitting

    Hi,
    Using: Oracle ApEx 3.0.1
    I have an sql report region that contains a hidden page item as part of the "where clause". My problem is, based on a value entered by the user, I need to assign this value enetered to my hidden item, so that it can be used within the where condition of my sql but this would need to be done without actually submitting the form.
    At the moment, I can set the value via an on-demand process but my SQL is still not returing any values as the hidden page item within the query is not set (as page has not been submitted).
    Can anybody please assist as I am not sure how to do this and whether in actual fact, this is possible to do, without having submitted the page.
    Thanks.
    Tony.
    Edited by: Tony F. on Nov 12, 2011 1:39 AM

    You can set a session value using a dummy ajax call e.g:
    Add the following to the 'Function and Global Variable Declaration' region
    function f_set_item(pThis){
      var get = new htmldb_Get(null,&APP_ID.,'APPLICATION_PROCESS=dummy',1);
      get.add('P1_ID',pThis.value)
      gReturn = get.get();
      get = null;
    }Where P1_ID is the session value to be set. Then call the function in the usual way e.g.
    javascript:f_set_item(this);
    I hope that helps
    Shunt

  • List of Values using page item variable

    I know there has to be a simple solution to my problem but I cannot figure it out. Any assistance would be greatly appreciated.
    I have a Shared list of values that I want to reuse on several of my pages. I have tried (I thought) all the variable possibilities but cannot figure out how to reference the page item in my list of values.
    Original code:
    select app_name d, app_sys_id f
    from ops_application
    where :P32_RADIO2 = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where :P32_RADIO2 = 'Database'
    Doesn't work:
    select app_name d, app_sys_id f
    from ops_application
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Application'
    union
    select db_name d, db_id f
    from ops_database
    where 'P'||:APP_PAGE_ID||'_RADIO' = 'Database'
    I also have tried 'P'||v('APP_PAGE_ID')||'_RADIO'
    'P'||&APP_PAGE_ID.||'_RADIO'
    'P&APP_PAGE_ID._RADIO'
    'P'||:APP_PAGE_ID||'_RADIO'
    Thanks,
    Gayle
    Edited by: user8116955 on Sep 27, 2010 12:25 PM

    Gayle,
    I haven't tried this, but what about
    where v('P'||:APP_PAGE_ID||'_RADIO') = 'Application'That should allow you to build up the name of the page item dynamically, and then test the value...
    A lower-quality solution would be to use an application item rather than a page item, as then you'd know the name ahead of time.
    Let me know if this works,
    -David

  • Recently used BOM Items showing on Inactive Report

    Product Version: 2007A SP01 PL10
    Hello,
    I have an issue with the Inactive report within SAP. It currently shows BOM items which have recently been used. Why would this be?
    Regards,
    Orla

    Hello,
    Take a look at this post here: http://forums.adobe.com/message/5941620#5941620
    Cheers
    Parikshit

  • Business Rule variable in Essbase report

    Hi,
    I need to create a report where I will use the variable (created as Business Rules variable e.g.- [BudYear],[CurrVersion] etc) but it is not working. If I use [BudYear] it is just showing the dimension name in report as 'Year'. But when I use any exxbase substitution variable (e.g.- &CurYear etc) it is working fine. So, can it be possible to use business rules variable in essbase reports?
    Can it be possible to save the essbase report in comma delimited format (I am only getting tab delimited option). Please revert back.
    Thanks & Regards.

    As John rightly said, HBR rules are only applicable within HBR. What you want is an Essbase Substitution Variable. So long as the value does not get selected interactively in the HBR, you can use a Substitution Variable instead. An example would be something like current year -- this isn't going to get changed by the users via a Planning form or a prompt.
    HBRs, Calc Scripts, member formulas, load rules, and of course Essbase report scripts can all read substitution variables. See the DBAG for more information. Personally, I only use HBR variables, local or global, for items off the POV or driven by a run-time prompt.
    Unfortunately, a comma delimted file is a pain in a report script -- you have to make your columns fixed length and then use the MASK command to put the commas in -- ugh. However tab delimited files are an option. I've never found an IT group that couldn't handle the latter format.
    You may also go with the the DATAEXPORT calc script command -- a comma delmited output is possible with that command and of course it supports Essbase substitution variables.
    Regards,
    Cameron Lackpour

  • Using environment variables in a wmi query

    Hello
    I'm trying to use WMI Queries on Group Policy Preferences to targeting computers on my network.
    I have a file named testfile.txt in Windows directory and I check its last modified date to replace the policy files if the date is older of than current file.
    I set this query : Select * from CIM_DataFile where Name='C:\\Windows\\testfile.txt' and LastModified<'20140910145110.821214+180'.
    The replace action occurs on all machines where windows directory is 'C:\Windows\'. But there are machines on network where windows is installed on directory 'C:\Windows7'.
    So I was thinking to use %WindowsDir% environment variable in the WMI query to ckeck testfile.txt date on the correct directory where windows is installed.
    I've tried different ways to use this environment variable in WMI query with no success (For example: Select * from CIM_DataFile where Name='%WindowsDir%\\testfile.txt' and LastModified<'20140910145110.821214+180').
    Can someone help me with the correct syntax?
    Thanks.

    > I set this query : Select * from CIM_DataFile where
    > Name='C:\\Windows\\testfile.txt' and
    > LastModified<'20140910145110.821214+180'.
    >
    > The replace action occurs on all machines where windows directory is
    > 'C:\Windows\'. But there are machines on network where windows is
    > installed on directory 'C:\Windows7'.
    >
    > So I was thinking to use %WindowsDir% environment variable in the WMI
    > query to ckeck testfile.txt date on the correct directory where windows
    > is installed.
    Short answer: You cannot use environment variables in WMI filters.
    But you can modify your query:
    Select * from CIM_DataFile where (Name = 'C:\\Windows\\testfile.txt' or
    Name = 'C:\\Windows7\\testfile.txt' ) and
    LastModified<'20140910145110.821214+180'
    Event this one should work:
    Select * from CIM_DataFile where Name like 'C:\\Windows%\\testfile.txt'
    and LastModified<'20140910145110.821214+180'
    BTW: The variable should be %windir% anyway, not %windowsdir% :)
    Martin
    Mal ein
    GUTES Buch über GPOs lesen?
    NO THEY ARE NOT EVIL, if you know what you are doing:
    Good or bad GPOs?
    And if IT bothers me - coke bottle design refreshment :))

  • Query Stripping not working properly when using variable in the report

    We have issue with WEBI document that have query stripping enable.
    Once the query stripping enabled there is no data return in the report.
    We have investigate on the problem, the query stripping function are notable to retrieve objects that indirectly used in the report
    as we have
    many variable in the reports.
    Ex.
    Var1 = object1 + object2
    Var2 = Object3 + Object4
    Var3 = Var1 + Var2
    Var4 = Object1 + Object2 + Object3 + Object4
    If we use only Var3 in the report, the object1,2,3,and 4 will not be
    retrieve.
    But if we are using Var4 in the report, the object1,2,3,and 4 will be
    retrieve properly.
    Please let me know is it a by-design behavior, if yes please share points on it

    Hi Amit,
    Thank you for response, however i already had alook on that VIdeo and it tells us about the basic enabling of query stripping.
    But my question is when we have a Variable in a report which is dependent on the other two variables it gives me #error so is it by design or not.
    Regards,
    Abhinav

  • How can I use Server level variables in a business model based report

    hi gems..
    I have declared one server level variable in the BI Analytics repository.
    Now I have made one business model based report.
    In one column I want to use that server level varible.
    I go to the formula tab of that column and then clicked on variable--> session --> put the name of the variable and click ok.
    But when i viewed the report, it is not showing the dates, rather it is showing the date format I chosed i.e DD-MMM-YYYY.
    please help..

    actually the previous problem got resolved...
    Now when I am trying to apply a filter on a particular column using that server variable, then it is showing that the varible has no value definition.
    I have clicked on the filter tab of that column-->add-->variables-->session variables-->then I put the name of the variable-->click OK.
    the following error is comming-
    Error Codes: YQCO4T56:OPR4ONWY:U9IM8TAC:OI2DL65P
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 23005] The repository variable, Variable_name, has no value definition. (HY000)
    I have made that server variable from manage-->variables-->(right click) create new initialisation block-->gave the name and wrote the query and aslo gave the connection pool name and test that and it worked fine..

  • How to create a variable, and how to use the same across all the reports?

    Hi,
    Is there any possibility of creating a variable at once and making use of that across in all the Crystal Reports?
    Thanks In advance for your time and solution.

    MohanMRK,
    can you describe how you get the value for this variable?
    is it calculated on one report and then you want to pass it to a 2nd report? if that's the case, what you can do is have the reports linked via an opendocument link and pass the value to the 2nd report as a parameter. the value / parameter is only shared when you press the opendocument hyperlink.
    please see the sdk library [here |http://www.sdn.sap.com/irj/boc/sdklibrary]and scroll down to the opendocument section near the bottom.
    if you are just trying to find a way to share a calculation across reports look into creating a Custom Function which can be added to your repository. please note that this will not pass a calculated value across 2 or more reports, but will just have a shared method of making the calculation.
    as Abhilash mentioned before, there's no way to use an actual Variable across 2 separate reports without them being a main report and subreport(s). in that case you'll want to look into Shared Variables.
    cheers,
    jamie

Maybe you are looking for

  • Multiple Apple Tv's sharing same network but in separate rooms

    Hi, I currently have an apple tv set up in my home theater room but would like add another atv in my bedroom.  Is it possible to have multiple atv's sharing the same wireless network.  Would this idea workout? thanks

  • Phone needs to be unlocked

    Hello, I have the following problem: This year in April, my boyfriend and I went to the US. In the Apple store in New York we bought and iphone 5. It came with Verizon as provider, but in the store they directly unlocked it for us. We never inserted

  • How to get full sound library for Garage Band

    I recently purchased the upgrade for Garage Band on my 06 iMac.  I received a huge library of sounds with the upgrade.  However, two days later, we had a power spike and I lost that computer.  So - I bought a New MacBook Pro Retna with the latest ver

  • Narrow Casting

    Hi all, Can anybody please tell the usuage of narrow casting. preferable with simple code. Anirban Bhattacharjee

  • Aperture 2 and 3

    I'm currently running V2 but would like to install V3 as a separate application, so that I can start a fresh library just using V3 but refer back to V2 when needed. Is this possible? Thanks.