Narrative view query

Is it possible to use a condition in a narrative view.
I have a summary report in which if the user clicks Month I should get in the list report's narrative view as Data for that month.
same thing goes for year and quarter. Is it possible?

Hi,
>I have a summary report in which if the user clicks Month I should get in the list report's narrative view as Data for that month.
Can you be clear on this.
User clicks Month value in month column?
So are you navigating to any other page when he clicks on that value?
If you are navigating to drill report,then pull one dummy column in that report criteria and hide it.Write formula to fetch date in fx of this dummy column,make month column as prompted in the drill report.Show that date fetched in narrative view as @n,n is position of that hidden column in criteria(@1 if its position is 1 from left).
Regards,
Srikanth

Similar Messages

  • Issue filtering a report (based on narrative view) with a dashboard prompt.

    I used HTML and java-script codes in narrative view to solve the issue of "linking different reports on selecting values from a drop-down". A new issue has cropped up due to that implementation. The issue is that i can't attach a dashboard prompt to such a report. This means, when i put this report on a dashboard page with a dashboard prompt to help filter the report, the report does not gets filtered (it does not seems to be connected to the dashboard prompt).
    Has anyone faced this issue before? If yes, please let me know how to tackle it at the earliest.
    Regards,
    Ramil

    Hi,
    sorry , i could not solve the problem. the below case statement i put in the formula of a date column but i got some syntax error.One more thing is case statement is appearing in the select query not in where condition. Do u mean to say if i will put the same column as is prompted then it will come in where condition.
    Could u plz help me where i am doing wrong .
    case when '@{Period}'='Weekly' then Alerts."Creation Date and Time"  between  '@{PStartDate -7}' and  '@{PStartDate}' end
    [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <between>: Syntax error [nQSError: 26012] . (HY000)
    SQL Issued: SELECT Alerts."Business Domain(s)", Alerts."Closing Action Type", Alerts.Closer, case when ''='Weekly' then Alerts."Creation Date and Time" between '' and '' end FROM "Common Productivity Reports for Alerts"

  • Data in a narrative view.

    Sorry if this is simple. Just want to display the multiple values from a report prompt, not dashboard prompt, in the report. My effort has taken me to the narrative view and am using @12 to display the values in the column which has been filtered. But it is listing the values many times for each row. Can I use the narrative to display only distinct @12s or is there a better way to get the prompt values into the report. Thanks

    You can do this with pivot table, it is not possible with Narrative.
    1. Create pivot view for same report
    2. exclude all the columns other than the column you want to show
    3. Put the column in measures
    4. duplicate the column, drag the duplicate column in to columns and hide
    5. drag measure labels into Rows
    6. apply aggregation to First on column in measures.
    it works, I will blog it shortly with screen shots soon.

  • VIEW Query Problem

    Hi Greg,
    I had created a view on a table which doesn't have Primary Key, but it has Unique and Not Null constraints on required columns.
    I had wrote a procedure to query the data on VIEW. I have experienced strange problem, very first call to procedure will take more time than succeeding requests. For example from second request onwards, it returns data in < 2 Sec, but first transaction is taking 12 Sec to 30 Sec.
    I thought that very first time VIEW is taking time to refresh it self. So, I added FORCE keyword in CREATE VIEW stattement. However, that doesn't helped out.
    In my further investigation I came to know that base table on which VIEW created, has to be loaded in to memory before querying on VIEW.
    So, I had executed a simple select statement on base table, before I execute VIEW query in procedure.
    With this change I got results consistently < 2 Sec all the times.
    My question is instead of executing the select statement on base table is there a way to load base tables data in memory before querying on VIEW?
    Thanks,
    Subbarao

    Hi,
    A view is nothing but parsed SQL statements stored in the database, a view may or may not run faster. If you execute the SQL used to define the view how much time is it taking. If you want try looking at MATERIALIZED VIEW , that may help you.
    thanks

  • Reg: fetch the data by using item_id which is retuned by In line View Query

    Hi all,
    create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
    insert into xxc_transactions values(null,null,null,null);
    create table xxc_items1(item_id number,org_id number,item_no varchar2(10));
    insert into xxc_items1 values(123,12,'book');
    create table xxc_headers(header_id number,order_id number);
    insert into xxc_headers values(null,null);
    create table xxc_lines(header_id number,item_id number,line_id number);
    insert into xxc_lines values(null,null,null);
    create table xxc_types_tl(transaction_id number,NAME varchar2(10));
    insert into xxc_types_tl values(106,'abc');
    create table xxc_quantity(item_id number);
    insert into xxc_quantity values (123);
    create table xxc_quantity_1(item_id number);
    insert into xxc_quantity_1 values (123);
    SELECT union_id.item_id,
           b.org_id,
           e.name,
           fun1(union_id.item_id) item_no
    FROM   xxc_transactions a,
           xxc_items1 b,
           xxc_headers c,
           xxc_lines d,
           xxc_types_tl e,
           (SELECT item_id
            FROM   xxc_quantity
            WHERE  item_id = 123
            UNION
            SELECT item_id
            FROM   xxc_quantity_1
            WHERE  item_id = 123
            UNION
            SELECT item_id
            FROM   xxc_transactions
            WHERE  item_id = 123) union_id
    WHERE  a.type_id = 6
           AND a.item_id  = b.item_id
           AND union_id.item_id = b.item_id
           AND a.org_id = b.org_id
           AND c.header_id = d.header_id
           AND d.line_id = a.trx_line_id
           AND d.item_id = b.item_id
           AND c.order_id = e.transaction_id
           AND b.org_id = 12
    GROUP  BY union_id.item_id,
              b.org_id,
              e.name
    ORDER  BY union_id.item_id;
    create or replace function fun1(v_item in number)
    return varchar2
    is
    v_item_no
    Begin
       select item_no from xxc_items1
       where item_id=v_item;
       return v_item_no ;
        Exception
         When Others Then
          v_item_no := null;
          return v_item_no;
    END fun1;
    I  need  fetch the data by using item_id which is retuned by In line View Query(UNION)
    item_id  org_id  name    item_no
    123        12        abc       book
    Version: 11.1.0.7.0  and 11.2.0.1.0
    Message was edited by: Rajesh123 Added test cases script
    Message was edited by: Rajesh123 changed Question as fetch the data by using item_id which is retuned by In line View Query(UNION)

    Hi Master , sorry for the late reply and can you please help on this?
    create table xxc_transactions(type_id number,trx_line_id number ,item_id number,org_id number);
    insert into xxc_transactions values(null,null,null,null);
    create table xxc_items(item_id number,org_id number,item_no varchar2(10));
    insert into xxc_items values(123,12,'book');
    create table xxc_headers(header_id number,order_id number);
    insert into xxc_headers values(null,null);
    create table xxc_lines(header_id number,item_id number,line_id number);
    insert into xxc_lines values(null,null,null);
    create table xxc_types_tl(transaction_id number,NAME varchar2(10));
    insert into xxc_types_tl values(106,'abc');
    create table xxc_uinon_table(item_id number);
    insert into xxc_types_tl values(123);
    SELECT   union_id.item_id,
             b.org_id ,
             e.name ,
             fun1(union_id.item_id) item_no   --> to get item_no
             FORM xxc_transactions a,
             xxc_items             b,
             xxc_headers           c,
             xxc_lines             d,
             xxc_types_tl          e,
             ( SELECT item_id
                 FROM   xxc_uinon_table ) union_id
    WHERE    a.type_id= 6
    AND      a.item_id = b.item_id
    AND      union_id.item_id = b.item_id
    AND      a.org_id = b.org_id
    AND      c.header_id = d.header_id
    AND      d.line_id= a.trx_line_id
    AND      d.item_id= b.item_id
    AND      c.order_id= e.transaction_id ---106
    AND      b.org_id = 12
    GROUP BY union_id.item_id,
             b.org_id ,
             e.name
    ORDER BY union_id.item_id;
    Note: xxc_uinon_table is a combination of UNION's
    select 1 from dual
    union
    select 1 from dual
    union
    select no rows returned  from dual;
    I will get 1 from the above Query
    Thank you in advanced

  • Problem with javascript in narrative view

    Hi gurús!
    I'm trying to put some conditional logic in a narrative view of my analysis. I found some tips, and wrote that:
    <script>
    if('@{FIN01TIME}{ }'=='Period')
    document.write("[b]Fiscal Year : [/b]@1       [b]Fiscal Quarter : [/b]@2       [b]Fiscal Period : [/b]@3       [b]Roll Up : [/b]@{FIN01ND}{ }      [b]Cost Center : [/b]@{FIN01CC}{ }       [b]Currency : [/b]@{FIN01CURR}{ }")
    if('@{FIN01TIME}{ }'=='Quarter')
    document.write("[b]Fiscal Year : [/b]@1       [b]Fiscal Quarter : [/b]@2       [b]Roll Up : [/b]@{FIN01ND}{ }      [b]Cost Center : [/b]@{FIN01CC}{ }       [b]Currency : [/b]@{FIN01CURR}{ }")
    if('@{FIN01TIME}{ }'=='Year')
    document.write("[b]Fiscal Year : [/b]@1       [b]Roll Up : [/b]@{FIN01ND}{ }      [b]Cost Center : [/b]@{FIN01CC}{ }       [b]Currency : [/b]@{FIN01CURR}{ }")
    </script>
    All works good, but the problem happens when I "click" on paging buttons of my analysis (see attached image: javascript_problem_paging.png). After click, it leaves me to a blank page with only narrative view content. Also, displays "error on page" warning in status bar (see attached image: javascript_problem_afterclick.png)
    I believe that this issue happens with "onclick" event of javascript. I tried to disable it, but still not works.
    Any help will be appreciated.
    Thanks for your time!
    Regards,
    Fabian

    Hi all!
    I get my own answer, jeje.
    Instead of use "document.write..." I put another narrative view with a <div> control and set it's content by "document.getElementById(..).innerHTML = "(same HTML code)""
    It works perfect! I hope that this achievement helps somebody else.
    Regards,
    Fabian

  • Formula in a narrative view

    Hi Gurus,
    Can you please help me with narrative views in OBIEE (11.1.1.5)?
    I have a table that lists customer sales., e.g.
    Customer Sales($mn) Rank
    Cust1 800 1
    Cust2 450 2
    Cust3 350 3
    Cust4 300 4
    Cust5 40 5
    Cust6 30 6
    Cust7 20 7
    Cust8 10 8
    Total 2000
    The requirement is to build a narrative view that uses different columns and totals. In this case, the narrative view should say:
    Top *3* customers provide *80%* of the revenue.
    (n = 3)
    (80% = sum(sales) where rank in top n / total sales) = (800+450+350)/2000*100
    I can't find a way to incorporate formulas. I can call the sales column (@2) but not able to put the calculation in the narrative view. Has anyone done such a thing before or knows how to do it?
    Thank you!!

    Thank you, HM... that worked great!!
    I have another quick follow up - is there a way to refer to individual values in the result set in a narrative? For example, based on the same table:
    Customer $mn Rank
    Cust1 800 1
    Cust2 450 2
    Cust3 350 3
    Cust4 300 4
    Cust5 40 5
    Cust6 30 6
    Cust7 20 7
    Cust8 10 8
    Total 2000
    I want to create another narrative that is the ratio of sales of the first and third ranked customer; i.e., the narrative I am trying to build is:
    No. 3 has to increase sales by *2.28* times to equal No. 1.
    (2.28 = 800/350)
    Is that possible, given that my table is sorted by rank?

  • Pagination in a Narrative view?

    Is there a way to use pagination controls in a Narrative view?
    I'm looking for either an out-of-the-box way to turn this on (maybe I'm just not seeing it?), or if that's not supported, then any ideas on how it might be otherwise implemented.
    Is this do-able at all? Am I just not seeing the place to active this?
    Thanks very much.

    Thank you, HM... that worked great!!
    I have another quick follow up - is there a way to refer to individual values in the result set in a narrative? For example, based on the same table:
    Customer $mn Rank
    Cust1 800 1
    Cust2 450 2
    Cust3 350 3
    Cust4 300 4
    Cust5 40 5
    Cust6 30 6
    Cust7 20 7
    Cust8 10 8
    Total 2000
    I want to create another narrative that is the ratio of sales of the first and third ranked customer; i.e., the narrative I am trying to build is:
    No. 3 has to increase sales by *2.28* times to equal No. 1.
    (2.28 = 800/350)
    Is that possible, given that my table is sorted by rank?

  • Script result not showing up in narrative view

    I'm making a org chart as a narrative view.
    If I do not tick "Contains HTML Markup" the result of the script is displayed. If I cut-n-past that content into a HTML file it display the result I'm looking for. However if I tick "Contains HTML Markup" the narrative view displays as empty.I have Attached two screenshots displaying this.
    Any ideas what I'm not doing right? Have I forgotten some config to enable scripts in narrative view?
    this is the script I'm using
    Prefix:
    <script type='text/javascript' src='https://www.google.com/jsapi'></script>
        <script type='text/javascript'>
    if(document.URL.indexOf("saw.dll?Answers") == -1) {
          google.load('visualization', '1', {packages:['orgchart']});
          google.setOnLoadCallback(drawOrgChart);
          function drawOrgChart() {
    if(document.URL.indexOf("saw.dll?Answers") == -1) { 
          var data = new google.visualization.DataTable();
            data.addColumn('string', 'Name');
            data.addColumn('string', 'Manager');
            data.addColumn('string', 'ToolTip');
            var myOrgArray=[];
            var tempStr = "";
    Narrative:
    myOrgArray.push(["@1","@3","@2"]);
    Postfix
         data.addRows(myOrgArray);
            var chart = new google.visualization.OrgChart(document.getElementById('div_orgchart'));
            chart.draw(data, {allowHtml:true});
        </script>
        <div id='div_orgchart'></div>

    Yes, sorry, client is obviously sufficient as well.
    Just tried your code and same behaviour here and it doesn't do squat either. Can't deep-dive into that code right now but it's definitely code-related issue rather than a browser one for example.
    Thought about trying d3js? Would be easier to reproduce for me as I use that more often than Google's data-munching pipe that pushes all your data through Google Analytics
    Edit: Clicked too quickly. Wanted to point you to the SampleApp dashboard page which hosts the example I meant: http://slc02oka.oracle.com:7780/analytics/saw.dll?Dashboard&PortalPath=%2Fshared%2F02.%20Visualizations%2F_portal%2F2.32…
    Username Prodney
    Password Admin123
    Edit 2: Jesus I really should stop clicking "Save Reply" just to not lose it. Simply show your analysis on a dashboard and you're fine. It'll work.

  • Unable to pass  presentation variable value to Go url with narrative view

    I am trying to use navigate option of Go URL. I have Dashboard prompt with presentation variable (pv)defined. I am able to see the pv value in compund view but unable to see in Narrative view. Any thoughts?

    Check my blog entry here http://oraclebizint.wordpress.com/2007/11/26/oracle-bi-ee-101332-same-page-navigation-drills-and-passing-parameters/. It has an example.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • Presentation variable in iframe/narrative view/Go URL

    I am able to see the peresentaion variable declared in Dashboard Prompt in narrative view.
    But when I put in iframe with narrative in Go URL then i am not able to filter the report based on presentation variable Values..." The page throws error
    'saw.aViewsToRefersh.all' is null or not an object.'

    Do you get that error if you remove the presentation
    variable column (@n). Does the a simple iframe work.
    Also, how are you referring the presentation variable
    in the iframe. I hope you are referring via a dummy
    column.
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com
    Yes the simple iframe work well in the browser. As I am trying to run report based on the dashboard prompt. I have declared presentation variable in Dashboard prompt and referring the presentation variable in the iframe via a dummy column. when i click on 'Go' of dashboard prompt after selecting the value in dropdown list, I see the error on left bottom most of Internet Explorer Showing " Done" is null or not any object. also i see javascript:void(null). I assume that the variable value is not getting passed to parameters i have given in Go URL

  • How to display presentation variable in a narrative view

    Is there any way that we can display the prompt value stored in a presentation variable in the narrative view?

    Hi,
    use this synatx @{PRESENTATION_VARIABLE}{'Default'}
    Regards,
    Gianluca

  • Can I write a Java Program in Narrative view and make it work?

    Hi All,
    I got a requirement which demands me to write a java program in narrative view. As per my knowledge its not possible..........but do you guys have any work around or any other way to get that java program run when the report runs and the out must be seen on the dashboard???
    Thanks in advance,
    DK

    Joe thanks for the reply. I would like to communicate with a JavaScript API (MapQuest) by declaring a Proxy server and port number to communicate. Or I can directly use Java SDK to display maps.
    This is more a general question. If I can execute a java program then I will try doing many things.
    Thanks,
    DK

  • Spatial vs. materialized views/query rewrite

    Dear all,
    we are trying to use Spatial (Locator) functionality together with performance optimization using materialized views and query rewrite, and it does not seem to work. Does anybody has experience with this?
    The problem in more detail:
    * There is a spatial attribut (vom Typ GEOMETRY) in our table;
    * we define a materialized view on that table;
    * we run a query that could be better answered using the materialized view with query rewrite;
    *the optimizer does not choose the plan using the materialized view, query rewrite does not take place;
    This happenes, even if neither the materialized view, nor the query contains the spatial attribut.
    The explanation given by the procedure DBMS_MVIEW.Explain_Rewrite is:
    "QSM-01064 query has a fixed table or view Cause: Query
    rewrite is not allowed if query references any fixed tables or views"
    We are using Oracle 9R2, Enterprise Edition, with locator. Nevertheless, it would also be interesting, if there is any improvement in 10g?
    A more complicated task, using materialized views to optimize spatial operations (e.g., sdo_relate) would also be very interesting, as spatial joins are very expensive operations.
    Thanks in advance for any comments, ideas!
    Cheers,
    Gergely Lukacs

    Hi Dan,
    thanks for your rapid response!
    A simple example is:
    alter session set query_rewrite_integrity=trusted;
    alter session set query_rewrite_enabled=true;
    set serveroutput on;
    /* Creating testtable */
    CREATE TABLE TESTTABLE (
    KEY1 NUMBER (4) NOT NULL,
    KEY2 NUMBER (8) NOT NULL,
    KEY3 NUMBER (14) NOT NULL,
    NAME VARCHAR2 (255),
    X NUMBER (9,2),
    Y NUMBER (9,2),
    ATTR1 VARCHAR2 (2),
    ATTR2 VARCHAR2 (30),
    ATTR3 VARCHAR2 (80),
    ATTR4 NUMBER (7),
    ATTR5 NUMBER (4),
    ATTR6 NUMBER (5),
    ATTR7 VARCHAR2 (40),
    ATTR8 VARCHAR2 (40),
    CONSTRAINT TESTTABLE_PK
    PRIMARY KEY ( KEY1, KEY2, KEY3 ));
    /* Creating materialized view */
    CREATE MATERIALIZED VIEW TESTTABLE_MV
    REFRESH COMPLETE
    ENABLE QUERY REWRITE
    AS SELECT DISTINCT ATTR7, ATTR8
    FROM TESTTABLE;
    /* Creating statistics, just to make sure */
    execute dbms_stats.gather_table_stats(ownname=> 'TESTSCHEMA', tabname=> 'TESTTABLE', cascade=>TRUE);
    execute dbms_stats.gather_table_stats(ownname=> 'TESTSCHEMA', tabname=> 'TESTTABLE_MV', cascade=>TRUE);
    /* Explain rewrite procedure */
    DECLARE
    Rewrite_Array SYS.RewriteArrayType := SYS.RewriteArrayType();
    querytxt VARCHAR2(1500) :=
    'SELECT COUNT(*) FROM (
    SELECT DISTINCT
    ATTR8 FROM
    TESTTABLE
    i NUMBER;
    BEGIN
    DBMS_MVIEW.Explain_Rewrite(querytxt, 'TESTTABLE_MV', Rewrite_Array);
    FOR i IN 1..Rewrite_Array.count
    LOOP
    DBMS_OUTPUT.PUT_LINE(Rewrite_Array(i).message);
    END LOOP;
    END;
    The message you get is:
    QSM-01009 materialized view, string, matched query text
    Cause: The query was rewritten using a materialized view, because query text matched the materialized view text.
    Action: No action required.
    i.e. query rewrite works!
    /* Adding geometry column to the testtable -- not to the materialized view, and not to the query! */
    ALTER TABLE TESTTABLE
    ADD GEOMETRYATTR mdsys.sdo_geometry;
    /* Explain rewrite procedure */
    DECLARE
    Rewrite_Array SYS.RewriteArrayType := SYS.RewriteArrayType();
    querytxt VARCHAR2(1500) :=
    'SELECT COUNT(*) FROM (
    SELECT DISTINCT
    ATTR8 FROM
    TESTTABLE
    i NUMBER;
    BEGIN
    DBMS_MVIEW.Explain_Rewrite(querytxt, 'TESTTABLE_MV', Rewrite_Array);
    FOR i IN 1..Rewrite_Array.count
    LOOP
    DBMS_OUTPUT.PUT_LINE(Rewrite_Array(i).message);
    END LOOP;
    END;
    The messages you get are:
    QSM-01064 query has a fixed table or view
    Cause: Query rewrite is not allowed if query references any fixed tables or views.
    Action: No action required.
    QSM-01019 no suitable materialized view found to rewrite this query
    Cause: There doesn't exist any materialized view that can be used to rewrite this query.
    Action: Consider creating a new materialized view.
    i.e. query rewrite does not work!
    If this works, the next issue is to use materialized views for optimizing spatial operations, e.g., a spatial join. I can supply you with an example, if necessary (only makes sense, I think, after the first problem is solved).
    Thanks in advance for any ideas, comments!
    Cheers,
    Gergely

  • Reg-Narrative View Case

    I have two columns A , B as two prompts.
    I am passing Values of A, B to Narrative View.
    I f A is selected A value should pass to Narrative View
    I f B is selected B value should pass to Narrative View
    FYI :User wont select both at a time.
    Thanks
    NK

    If you are using presentation variables then just call them using @{VarName} in Narrative view
    like @{A}@
    based on the value the view would show it.
    If you are not using presentation variables then
    use those A and B columns in the report
    and call them in Narrative view using their positions like @1@2
    where 1 the position of A from left in criteria
    Edited by: Srini VEERAVALLI on Apr 1, 2013 11:31 AM

Maybe you are looking for

  • RAM Upgrade was easy

    Hey all, I've found good advice here in the past, so thought I'd share just how easy my upgrade to 4G RAM went. After reading through the forums here, there seemed to be pretty much a consensus that CRUCIAL made good RAM for iMacs. I went to their we

  • Main vi freeze after close sub vi

    Dear all, I call a sub vi from my main vi but when i close sub vi, the main vi become freeze. The sub vi is a vi i used to edit a data from my database, its close after execute a query. Freeze also happen if i close the sub vi with [x] in the corner

  • Concatenate two lines?

    How to concatenate two different variables and display them in two different lines. eg: var1 = "Hello, How are you doing?" var2 = "I am fine, Thank You" If I do concat(var1,var2) the output I am getting is as follows: "Hello, How are you doing?I am f

  • Plugin Dialog not visible in Photoshop CS4 64bit

    Hi all, I am new in the world of photoshop plugins. I am using adobe photoshop CS4 64bit environment. I have converted a 32bit plugin into a 64bit plugin. I have succesfully loaded the plugin . Now my problem is when i click on the pluginName from th

  • Where do I change my iCloud email address?

    Where do I change my iCloud old email address? My Apple email address is good.