Passing a date presentation variable in 'Invoke a Browser Script'

Hi,
I have a problem with passing presentation variable with Invoke a Browser Script.
In my main report i set the filters and it works correctly:
ColumnDate is greater than or equal to  @{vStartDate}{01/05/2015}
ColumnDate is less than or equal to  @{vEndDate}{04/05/2015}
(It works with different dates, i have tested, not only for the values between 01/05/2015 and 04/05/2015)
i gave the same filters to the detail report.
When i choose the action link to go the detail report, it only brings me the values between 01/05/2015 and 04/05/2015 .
If i remove the default date values then both report gives the error :
A date value was expected (received "vStartDate"). 
Error Details
Error Codes: GYYEWLWG 
What i am doing wrong?
Please help me.
Thanks in advance.

You should be using prepared statements.
String scoredGoalsQuery = "SELECT count(name) from player_goal_rel where name = ? and pdate BETWEEN ? and ?":
PreparedStatement pstmt = connection.prepareStatement(scoredGoalsQuery);
pstmt.setString(1, pName);
pstmt.setDate(2, startYear);
pstmt.setDate(3, endYear);
ResultSet scoredGoalsResult = pstmt.executeQuery();

Similar Messages

  • Date Presentation variable

    Hi,
    If Date presentation variable (with between operator) returning two values,
    how to call the first value specifically...
    thanks in advance.
    Siva Prasad

    Siva Prasad wrote:
    Hi,
    If Date presentation variable (with between operator) returning two values,
    how to call the first value specifically...
    thanks in advance.
    Siva PrasadRead this...
    http://oraclebizint.wordpress.com/2008/02/26/oracle-bi-ee-101332-between-prompts-for-date-columns-using-presentation-variables/

  • "Invoke a Browser Script" Action in OBIEE 11g

    Follow website : http://www.rittmanmead.com/2012/07/navigating-to-bi-content-in-obiee11g-and-passing-multiple-parameters/
    In file "D:\oracle\user_projects\domains\bifoundation_domain\servers\AdminServer\tmp\_WL_user\analytics_11.1.1\silp1v\war\res\b_mozilla\actions\UserScripts.js"
    I added the following function(s) to "UserScripts.js":
    USERSCRIPT.customPortalPageNav = function(arg_array){
    var str="parent.PortalPageNav(1";
    for(args in arg_array){
    var arg_name=args;
    var value=arg_array[arg_name];
    str+=",'"+value+"'";
    str+=")";
    eval(str);
    USERSCRIPT.customPortalPageNav.publish={parameters:[
              new USERSCRIPT.parameter("1","Dashboard","/shared/FOLDERNAME/_portal/DASHBOARDNAME"),
              new USERSCRIPT.parameter("2","Page","Insert your Page"),
              new USERSCRIPT.parameter("3","Table","Insert Table"),
              new USERSCRIPT.parameter("4","Column","Insert Column"),
              new USERSCRIPT.parameter("5","Value","Insert Value")]};
    However, this function "USERSCRIPT.customPortalPageNav" cannot be displayed in "Invoke a Browser Script" Action.
    If I put the function name "USERSCRIPT.customPortalPageNav" directly in the "Invoke a Browser Script" Action dialogue, an error message will be shown. It said:
    The function "USERSCRIPT.customPortalPageNav" does not exist.
    Please check with your administrator that this function has been setup correctly in the user-defined script file.
    What I have done wrongly? Or, how can I check the "UserScripts.js" file path is correct? How can I find a correct path for "UserScripts.js">

    Hi Dpka,
    Yes, I do. But, still the same.
    In fact, I can see two sample functions in "Invoke a Browser Script" Action. (i.e. USERSCRIPT.putUrlInFrame, USERSCRIPT.example_displayParameters).
    I edit "USERSCRIPT.example_displayParameters", replace "new USERSCRIPT.parameter( 'p3', 'Enter value for Param 3' )" to "new USERSCRIPT.parameter( 'p3', 'Enter value for Param 3', 'p3 default value' )".
    Still, there is no default value for "p3".
    So, I wonder whether my file path is wrong. But, how can I know where is the exact path?

  • Pass current Date to variable thru Command Wizard

    Hi ,
    I have an date input variable for a query. I would like to pass the current date to this variable using the Command Wizard when the Web template is executed. Can someone please help me
    Thanks

    Hi,
    0DAT will not solve my problem.
    I have a 2 query variables ZDATE and  ZVARMTD. ZVARMTD is a user exit variable and will be populated based on the value in ZDATE(input).
    Initially I want to default ZDATE with current date -1. I have the user exit coded to set this variable to (sys date -1). I thought of using the offset. But it shows only single values, I don’t see variables.
    If the user then enters another value, the user exit will set the MTD based on the date entered.
    In the Query , I have this variable ZDATE in the restriction of a key figure 0AMOUNT and ZVARMTD for 0CALDAY in the Filter..
    (If i have ZDATE) in the filter, it only shows the values for the entered date.. Actually we want the report for Month to Date.
    When i debug , i dont see this variable(ZDATE) in i_vnam and it is never going to my code. I only see those variable(ZVARMTD) i have in the 'filter' tab
    So ithought I can populate using the Java Script while executing the Web ...
    Any help ..

  • Issue with Dashboard Prompt passing value to Presentation Variable

    I have 2 tabular reports that grab 2 variables respectively: @Month and @Year.
    The reports work fine.
    My issues is that to compute the most recent month & year, so I can pass the values to the 2 variables mentioned above, I have a dashboard prompt on the same page as the 2 reports. In the dashboard prompts (Edit Box types), I have SQL in the "Default" that computes the most recent month & year. This logic also works perfectly when you preview the results of the prompt.
    My issue is that when I land on the page, it seems that the month & year prompts are not computing. I have an old value of "Dec" "2009" instead of "May" "2010".
    It seems the Default SQL logic is NOT running on its own? As an aside, we do our development in a test environment and the catalog is promoted to production nightly. The "Dec" and "2009" I see is the correct value for the test environment, so it looks as if the defaul values are just being migrated with the catalog, but then the SQL to compute the latest values of the 2 propmts are never executing when the user lands on the page? Thus everyone sees Dec 2009 data instead of May 2010...Help!

    Hi,
    dgerena wrote:
    My issues is that to compute the most recent month & year, so I can pass the values to the 2 variables mentioned above, I have a dashboard prompt on the same page as the 2 reports. In the dashboard prompts (Edit Box types), I have SQL in the "Default" that computes the most recent month & year. This logic also works perfectly when you preview the results of the prompt.You are creating the second prompt (edit box) to make the first prompt values, You can use the same sql in the report default to SQL in the first prompt itself.
    If I am wrong please clarify.
    Thanks,
    Vino

  • Invoking a Browser Script in OBIEE 11.1.1.5.0

    Hi
    In-order to meet a requirement I modified the Userscript.js in 11.1.1.5.0 located at "E:\Middleware\user_projects\domains\bifoundation_domain\servers\bi_server1\tmp\_WL_user\analytics_11.1.1\7dezjl\war\res\b_mozilla\actions". After this I restarted all the services in EM, BI Server and ADMIN Server, but to no avail, the changes didn't reflect. It would be very helpful and greatly appreciated if you could provide a work-around/pointer etc to help reolve this issue. Should you require any information please let me know.
    Thanks!!

    Check this:-
    How-to: OBIEE 11g Javascript Integration using Action Framework (Browser Script) ~ Ask John OBIEE - Oracle Business Inte… 
    Mark if helps,
    Thanks,

  • Can I pass parameters from a dashboard via a dashboard prompt and presentation variable to publisher report based on a data model with select statements in OBIEE 11g ?

    I have a publisher 11g (v 11.1.1.7)  report with a single parameter. The report is based on a data model not a subject area.  I created a dashboard put a dashboard prompt and link to the report in separate section on the same page.  The dashboard prompt sets a presentation variable named the same as the parameter in the report. 
    The problem was when I created the dashboard prompt, it forced me to select a subject area which I did (though did not want to) and then I created both a column and variable prompts. But clicking on the
    report link completely ignored the value that I thought would be passed in the presentation variable to the report.
    Side note :  My report uses a pdf template for its layout where I have mapped the columns names from my data model to the form fields on the pdf form.  I noticed that if I create a publisher report based on a subject area, then I do not have the choice to choose a PDF as a template type for my layout.  (I only see BI Publisher Template as a choice). 
    I see some documentation online that suggest it could be done in 10g.
    Thanks
    M. Jamal

    Ok,
    I just tried that and it still doesn't pass anything to the prompt.
    I changed the prompt to an edit field and I made the following weblink but when i click the link from an account it doesn't put anything in the prompt and all data for all accounts is shown.
    This is the URL maybe I messed something up...
    https://secure-ausomx###.crmondemand.com/OnDemand/user/Dashboard?OMTHD=ShowDashboard&OMTGT=ReportIFrame&SelDashboardFrm.Dashboard Type=%2fshared%2fCompany_########_Shared_Folder%2f_portal%2f360+Report&Option=rfd&Action=Navigate&P0=1&P1=eq&P2=Account."Account Name"&P3=%%%Name%%%
    thanks

  • Use presentation variable in date filter

    Hi,
    I have a Date presentation variable pvEffDt whose value is set in a dashboard prompt. How do I access this variable in a Date between filter? I actually need data for chosen date's previous month (weird, why don't I choose the previous month itself. yeah true, but I want to try something else).
    I have tried the following but to no avail - CAST (TIMESTAMPADD(SQL_TSI_MONTH, -1, cast('@{pvEffDt}[MM/DD/YYYY]' as TIMESTAMP) as DATE)
    I get the following error -
    Odbc driver returned an error (SQLExecDirectW).
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 43113] Message returned from OBIS. [nQSError: 27002] Near <(>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: {call NQSGetLevelDrillability('SELECT "AFM"."GRP_ID" saw_0, "HIER_DEF"."HIER_DSC" saw_1, "HIER_DIM"."CD_DSC_LV1" saw_2, "AFM"."HIER_ID" saw_3, "AFM"."ATTR_REF_DIM_KEY" saw_4, "AFM"."RPTD_CURCY_CD" saw_5, "AFM"."BMARK_ID" saw_6, "AFM"."WT_TOT_ADJ_ACCT" saw_7, "AFM"."WT_TOT_ADJ_BMARK" saw_8, "AFM"."PCT_CONTRIB_BASE_ACCT" saw_9, "AFM"."PCT_CONTRIB_LOCL_ACCT" saw_10, "AFM"."PCT_CONTRIB_BASE_BMARK" saw_11, "AFM"."PCT_CONTRIB_LOCL_BMARK" saw_12, "AFM"."SEC_SEL_BASE" saw_13, "AFM"."SEC_SEL_LOCL" saw_14, "AFM"."MKT_ALLOC_BASE" saw_15, "AFM"."MKT_ALLOC_LOCL" saw_16, "AFM"."INTERACTION_BASE" saw_17, "AFM"."INTERACTION_LOCL" saw_18, "AFM"."CURRENCY_EFFECT" saw_19, "AFM"."TOT_EFFECTS_BASE" saw_20, "AFM"."TOT_EFFECTS_LOCL" saw_21, "AFM"."SEC_SEL_BASE" - "AFM"."SEC_SEL_LOCL" saw_22, "AFM"."MKT_ALLOC_BASE" - "AFM"."MKT_ALLOC_LOCL" saw_23, "AFM"."INTERACTION_BASE" - "AFM"."INTERACTION_LOCL" saw_24, "AFM"."TOT_EFFECTS_BASE" - "AFM"."TOT_EFFECTS_LOCL" saw_25, "AFM"."EFF_DT" saw_26 FROM "Perf Attr" WHERE ("HIER_DIM"."CD_DSC_LV1" <> ''Total'') AND ("AFM"."GRP_ID" = ''3699'') AND ("AFM"."ATTR_REF_DIM_KEY" = 2) AND ("AFM"."EFF_DT" = ADD_MONTHS(DATE ''10/31/2012'', -1))')}
    Regards,
    Vijay.

    I had already tried this before and it didn't work either.
    Just to point it again, I am defining this In the filter, under More Options->Presentation Variable.
    i have also tried doing "Convert this filter to SQL" and passed
    ("ATTR_FACT_MTHLY"."EFF_DT" IN (ADD_MONTHS(@{pvEffDt}, -1)))
    Just to verify the same, I tried
    ("ATTR_FACT_MTHLY"."EFF_DT" IN (ADD_MONTHS(TO_DATE('31/10/2012', 'DD/MM/YYYY'), -1)))
    but even this did not work.
    I really don't know how to make it work. I simply need the filter to have the value "Chosen date's previous month".

  • Presentation Variable name being passed as value

    I have a requirement where value needs to be checked against two separate fields for filtering (as OR statement). But there should be ability to filter on these fields separately as well.
    Dashboard prompt:
    Province [Multi search]
    State [Multi search]
    Combined search (Province OR State Fields) [Edit Box] --- used to pass presentation variable
    Report filter:
    Province is prompted
    AND State is prompted
    AND Province is @{presentation_variable} (no default)
    OR State is @{presentation_variable} (no default)
    But if the text field with presentation variable in not used to filter, then the report shows no result because the presentation variable name itself is taken as a value. Any solution how this can be done making sure that if province only is searched for then the presentation variable is not passed as value and the query returns no results?
    Thanks everyone.

    Thanks Rachit, that helps. For the scenario mentioned initially, even this works:
    Province is @{presentation_variable} (no default)
    OR State is @{presentation_variable} (no default)
    But the challenge is if I want to add another filter (like country) also as a filter. When users filter only on country, then the report shows no results because no value has been passed to the presentation variable and the query generated uses presentation variable name as the value!

  • Presentation Variables Date Format

    Hi,
    I have a direct sql request that uses date presentation variables via a dashboard prompt:
    Direct SQL:
    select id, customer
    from test
    where date between @startdate and @enddate
    If I enter startdate '31/03/2013 00:00:00' in the dashboard prompt selection:
    OBIEE converts the above query into database date format:
    'YYYY-MM-DD HH24:MI:SS'
    The database is in date format DD-MON-YYY, this results in error ORA-01861: literal does not match format string
    can anyone help with where the date format should be set?
    Thanks

    There are different levels of users on this forum so you need to be more specific and provide examples to novice users....I want user to think on given hints and fix by himself instead of detailed with examples, this would help user to learn and think in new dimensions instead of depending on any one.
    Sometimes I'll be responding more detail based on their registered date with OTN and # posts posted.
    in your case my hint not fired!! so no full points ;)
    Check this
    Re: How set two presentation variables with one prompt
    Edited by: Srini VEERAVALLI on Apr 11, 2013 10:55 AM

  • OBIEE ActionLink-Action-Invoke a Brower Script ISSUE

    I am having an issue while trying to use the "Invoke a Browser Script" feature in Action Link. The "Select Script Function" screen is blank, meaning I am not able to select any of the functions from the UserScripts.js residing in the below directory
    /xxx/xxx01/appl/Middleware/user_projects/domains/bifoundation_domain/servers/bi_server1/tmp/_WL_user/analytics_11.1.1/7dezjl/war/res/b_mozilla/actions/UserScripts.js
    Steps which I created are
        1. Login to Analytics
        2. Edit a Report
        3. Select Criteria
        4. Select a Column under Selected Columns section
        5. Click on Column Properties
        6. Click on Interaction Tab
        7. Selected "Action Links" from the Primary Interaction drop down list
        8. Add Action Link
        9. Entered name as xTest for Link Text
        10. clicked on Create New Action Icon
        11. Selecte Invoke a Browser Script option
        12. clicked on the Browse button for Funtion Name
        13. the Select Script Function pop-up menu is BLANK
    Refrence Article: http://www.rittmanmead.com/2012/07/navigating-to-bi-content-in-obiee11g-and-passing-multiple-parameters/
    Any help on this will be highly appreciated.
    Thanks
    Hari

    Hi Dpka,
    Yes, I do. But, still the same.
    In fact, I can see two sample functions in "Invoke a Browser Script" Action. (i.e. USERSCRIPT.putUrlInFrame, USERSCRIPT.example_displayParameters).
    I edit "USERSCRIPT.example_displayParameters", replace "new USERSCRIPT.parameter( 'p3', 'Enter value for Param 3' )" to "new USERSCRIPT.parameter( 'p3', 'Enter value for Param 3', 'p3 default value' )".
    Still, there is no default value for "p3".
    So, I wonder whether my file path is wrong. But, how can I know where is the exact path?

  • We are not able to pass the presentation variables(date & Date1) to the det

    Hi,
    We have followed the below link to use the date between prompt and passed the presentation variables in the filter condition of the report criteria.
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    But we are not able to pass the presentation variables(date & Date1) to the detail report.
    Any suggestions are highly appreciated.
    Thanks in Advance
    Siva.

    Yes,I think it wont pass the parameters from one parent report to child report.one thing you can do is put the detailed report on a page in the same dashboard as that of prompt.Put the same between condition on that report also.Give navigation link to this page instead of report.You can hide this page as well so that it will be available only on navigation.
    i have not tried it.Give it a try.
    Regards,
    Sandeep

  • How can I pass a Presentation Variable (Date) into a prompt

    Hello
    How can I pass a Presentation Variable (date) into a prompt? I seem to be able to do this successfully for a non-date value but have had no luck with a Date variable.
    Here's a simplistic version of what I'm trying to do:
    1. I have a Presentation Variable called startDate which is a Date that defaults to this SQL - SELECT "Reporting Dates"."Measure Date" FROM Trading WHERE "Reporting Dates"."Date Name" = 'Current'.
    2. I now want to pass this variable into a prompt with SQL like this: SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date'@{startDate}{2009-04-24}'
    I get this error: Datetime value @{startDate}{2009-04-24} from @{startDate}{2009-04-24} does not match the specified format.
    Now I can use the exact same syntax in a filter. For example, a simple Answers request where I pick Position Date with a filter saying "Position Date"."Position Date" = date'@{startDate}{2009-04-24}' works fine.
    What am I doing wrong?
    Thanks!

    Can you provide more information please?
    1. What is the format of the first date prompt, is it YYYY-MM-DD or?
    2. Which data type is Position Date."Position Date" in the physical layer, date or date time?
    3. What is the column formula in the first prompt?
    4. The first prompt is set to drop-down or?
    5. If you are using this SQL Results in the second prompt:
    SELECT "Position Date"."Position Date" FROM Trading where "Position Date"."Position Date" = date '@{startDate}{2009-04-24}'
    then @{startDate} must be in YYYY-MM-DD format to work properly, otherwise (for example):
    datetime value 01/01/2000 from 01/01/2000 does not match the specified format.
    This doesn't work for example:
    SELECT Times.time_id FROM "Normal model" where Times.time_id =date '01/01/2000'
    Regards
    Goran
    http://108obiee.blogspot.com

  • How to pass Presentation Variable Value from Main Report to Detail Report

    Hello,
    I've 2 reports that is attached to each other. In my main report i've several report prompts and i am using i"s prompted" on my detail report to attach them.
    But 2 of my report prompts are presentation variables(Names : FIRST, SECOND). Both are in date format. I've a filter in my main report like;
    "ASSIGNMENTS_F"."EFFECTIVE_START_DATE" BETWEEN @{FIRST} AND {SECOND}
    It works fine when i run the main report. But when i click on the numbers, i see that i can not filter my detail report with the chosen values for 2 presentation variables. It just shows all the dates.
    I've tried adding both presentation variables in both reports as columns and adding 'is prompted' filter to them. But did not work either.
    I just cant pass the written values for presentation variable prompts to detail report..
    Please help :)

    Hi,
    What you can try is refer the filte condition in the main report to the detailed report with the option--> Filter based on another request.
    Or you try creating another intermediate report which will refer the main report filters and pass the filters to the detailed report.
    Hope this helps.
    Regards
    MuRam

  • How to pass presentation variable in column Fx using GO URL

    Hi All,
    I want to show a download link directly using go url .
    In my dashboard prompt i am using some presentation variable .
    those variables i am using in the report's column formula .
    When i am applyning the prompt that it is not applying in the column Fx. so when i download the excell it shows same data for all the option choosen.
    If anybody knows the syntax please help.
    Thanks ...

    Hi,
    Like this you can pass presentation variables to the columns using Go URL
    '<a href=saw.dll?Dashboard&PortalPath=/shared/Test/_portal/Test%20KPIs&Page=Page1&Action=Navigate&col1="Dim%20Country"."Country%20Name"&val1='||'@{PV_Contry'||'>'||'Country'||'<\a>'
    Please use backslash in anchor tag end. Since here it is not accepting I am using forward slash.
    Thanks
    Vino

Maybe you are looking for