Display Column Value Once

Hey,
I am trying to only display a column value one time for a record, not a static value. The value changes and there can be many values. I do not think grouping will work since the Date value is dynamic. I am using Oracle for Toad 10.5. There are 4 records with this test data.
select Date, Person, Language, Country
from TableA
TableA
Date            Person  Language   Country
01/25/2013       James   English
12/20/2012       James   English
                                     US
                                     AFWould like to only display
Date            Person  Language   Country
01/25/2013       James   English
12/20/2012 
                                     US
                                     AFThanks for reading this thread!
Edited by: Nikki on Jan 7, 2013 1:08 PM

Hi,
You can use the analytic ROW_NUMBER function to see if a given row is the 1st row in a group, and only display the person and language columns when it is:
WITH     got_r_num     AS
     SELECT       dt          -- DATE is not a good column name
     ,       person, language, country
     ,       ROW_NUMBER () OVER ( PARTITION BY  person
                                  ,          language
                           ORDER BY          dt
                         )  AS r_num
     FROM      table_x
SELECT       dt
,       CASE WHEN r_num = 1 THEN person   END)     AS person
,       CASE WHEN r_num = 1 THEN language END)     AS language
,       country
FROM       got_r_num
ORDER BY  person, language, dt     -- If wanted
;Your front end may also have a way to hide those values when you want. The BREAK feature in SQL*Plus does this; I don't know if Toad has anything comparable.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) where the query above produces the wrong results, and also post the right results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using (e.g., 11.2.0.2.0).
See the forum FAQ {message:id=9360002}

Similar Messages

  • Display column value as column name

    Hi,
    I have a requirement to display column names as column values and vice versa. Pls suggest how to do this.
    Test data
    create table oratest as select 'saurabh' "name",23 "age" from dual;
    SQL> select * from oratest;
    name           age
    saurabh         23Expected output
    saurabh         23
    name           age

    Ok, I've only got 10g here at the minute, so this is what I'd do...
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2    v_v_val     VARCHAR2(4000);
      3    v_n_val     NUMBER;
      4    v_d_val     DATE;
      5    v_ret       NUMBER;
      6    c           NUMBER;
      7    d           NUMBER;
      8    col_cnt     INTEGER;
      9    f           BOOLEAN;
    10    rec_tab     DBMS_SQL.DESC_TAB;
    11    col_num     NUMBER;
    12    v_rowcount  NUMBER := 0;
    13    v_name      VARCHAR2(20);
    14    v_age       NUMBER;
    15    v_sql       VARCHAR2(4000);
    16    v_str       VARCHAR2(250);
    17    v_und       VARCHAR2(250);
    18  BEGIN
    19    select "name", "age"
    20    into   v_name, v_age
    21    from   oratest;
    22    v_sql := 'SELECT ''name'' as "'||v_name||'", ''age'' as "'||v_age||'" from dual';
    23    c := DBMS_SQL.OPEN_CURSOR;
    24    DBMS_SQL.PARSE(c, v_sql, DBMS_SQL.NATIVE);
    25    d := DBMS_SQL.EXECUTE(c);
    26    DBMS_SQL.DESCRIBE_COLUMNS(c, col_cnt, rec_tab);
    27    --
    28    -- Bind local return variables to the various columns based on their types
    29    FOR j in 1..col_cnt
    30    LOOP
    31      CASE rec_tab(j).col_type
    32        WHEN 1 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000); -- Varchar2
    33        WHEN 2 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_n_val);      -- Number
    34        WHEN 12 THEN DBMS_SQL.DEFINE_COLUMN(c,j,v_d_val);     -- Date
    35      ELSE
    36        DBMS_SQL.DEFINE_COLUMN(c,j,v_v_val,2000);  -- Any other type return as varchar2
    37      END CASE;
    38    END LOOP;
    39    -- Display the header
    40    FOR j in 1..col_cnt
    41    LOOP
    42      v_str := v_str || rpad(rec_tab(j).col_name,30,' ')||' ';
    43      v_und := v_und || rpad('-',30,'-')||' ';
    44    END LOOP;
    45    v_str := rtrim(v_str);
    46    v_und := rtrim(v_und);
    47    DBMS_OUTPUT.PUT_LINE(v_str);
    48    DBMS_OUTPUT.PUT_LINE(v_und);
    49    --
    50    -- This part outputs the DATA
    51    v_str := '';
    52    LOOP
    53      v_ret := DBMS_SQL.FETCH_ROWS(c);
    54      EXIT WHEN v_ret = 0;
    55      v_rowcount := v_rowcount + 1;
    56      FOR j in 1..col_cnt
    57      LOOP
    58        CASE rec_tab(j).col_type
    59          WHEN 1  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
    60                       v_str := v_str||rpad(v_v_val,30,' ')||' ';
    61          WHEN 2  THEN DBMS_SQL.COLUMN_VALUE(c,j,v_n_val);
    62                       v_str := v_str||lpad(to_char(v_n_val,'fm999999999999'),30,' ')||' ';
    63          WHEN 12 THEN DBMS_SQL.COLUMN_VALUE(c,j,v_d_val);
    64                       v_str := v_str||rpad(to_char(v_d_val,'DD/MM/YYYY HH24:MI:SS'),30,' ')||' ';
    65        ELSE
    66          DBMS_SQL.COLUMN_VALUE(c,j,v_v_val);
    67          v_str := v_str||rpad(v_v_val,30,' ')||' ';
    68        END CASE;
    69      END LOOP;
    70      v_str := rtrim(v_str);
    71      dbms_output.put_line(v_str);
    72    END LOOP;
    73    DBMS_SQL.CLOSE_CURSOR(c);
    74* END;
    SQL> /
    saurabh                        23
    name                           age
    PL/SQL procedure successfully completed.
    SQL>Now, with 11g you can actuall create the DBMS_SQL cursor from the top part of the code...
    18  BEGIN
    19    select "name", "age"
    20    into   v_name, v_age
    21    from   oratest;
    22    v_sql := 'SELECT ''name'' as "'||v_name||'", ''age'' as "'||v_age||'" from dual';
    23    c := DBMS_SQL.OPEN_CURSOR;
    24    DBMS_SQL.PARSE(c, v_sql, DBMS_SQL.NATIVE);And using the new function in 11g's DBMS_SQL package called dbms_sql.to_refcursor and convert the DBMS_SQL cursor to a REF CURSOR which you can then use in your applications (if that's the way you need to go)...
    http://www.oracle.com/technology/oramag/oracle/07-nov/o67asktom.html
    Whatever route you take though, you won't do this simply in SQL as the column names of a query are required to be known before any data is retrieved when a query (cursor) executes. You can see that when you use the DBMS_SQL package, where the query has to be parsed and the column names and descriptions are determined before any fetching of data.

  • Display column values as a series/legend on a line chart where one column value can be more than one category

    Hi Everyone
    I don't know if this is possible or not, so I will describe it. I have a column in a table called Filing. There are currently three values in it ("Abuse", "Neglect", "Voluntary") and each record has this populated. I also have
    the below slicer for the column also.
    I would like to add a fourth value called "Abuse/Neglect" that would identify instances where both an Abuse and Neglect petition was filed, which is a subset of the Abuse and Neglect records in the Filing column.
    My question is, is it possible to create a line chart that has the 4 Filing possibilities: "Abuse", "Neglect", "Voluntary", "Abuse/Neglect" as the Series/Legend in the line chart?
    The problem is that there are records that are more than one category: Abuse or Neglect records can also be Abuse/Neglect.
    Paul

    Hi Paul,
    According to your description, there is a column with the values ("Abuse", "Neglect", "Voluntary") in your table, now what you need to is that add another value "Abuse/Neglect" in this column, and then use it
    as Series/Legend in the line chart, right?
    In this case, you can add calculated column to your table based on your logic. A calculated column is a column that you add to an existing PowerPivot table. Instead of pasting or importing values in the column, you create a DAX formula that defines
    the column values. The calculated column can be used in a PivotTable, PivotChart, or Power View report as you would any other data column. Please refer to the link below to see the details.
    https://msdn.microsoft.com/en-us/library/gg413492%28v=sql.110%29.aspx?f=255&MSPPError=-2147217396
    Regards,
    Charlie Liao
    TechNet Community Support

  • Display column values as zeros

    I am having three select queries with union below:
    select col1, col2 from table1 where condition; -> fetches 1 record
    union
    select col1, col2 from table2 where condition; -> fetches no row
    union
    select col1, col2 from table3 where condition; -> fetches no row
    so output is 1 row. example;
    col1 col2
    1 1
    The 2nd and 3rd select doesnt fetch any record. My req is to dislplay the col values as zeros for any of 3 select statements which doesnt fetch any records from table
    so req output which looks like:
    col1 col2
    1 1
    0 0 -> norecords fetched(displaying zeros)
    0 0 -> norecords fetched(displaying zeros)
    Please let me know how can i do this in the query? I need to do this in the same qury and not using any functions/proc..
    Edited by: user11942774 on Aug 22, 2010 4:13 AM

    MichaelS wrote:
    Or
    SQL> var deptno1 number
    SQL> var deptno2 number
    SQL> begin
    :deptno1 := 20;
    :deptno2 := 100;
    end;
    PL/SQL procedure successfully completed.
    SQL> select nvl (deptno, 0) deptno
    from (select :deptno1 dn from dual), dept
    where deptno(+) = dn
    union all
    select nvl (deptno, 0) deptno
    from (select :deptno2 dn from dual), dept
    where deptno(+) = dn
    DEPTNO
    20
    0
    2 rows selected.Note: Above worked on my old 9.8.0.2 but strange enough not on my 11.2.0.1 (Only the first part of the UNION ALL displayed)! A bug???Looks to be.
    set serveroutput off
    ALTER SESSION SET STATISTICS_LEVEL = ALL;
    select nvl (deptno, 0) deptno
      from (select :deptno1 dn from dual), scott.dept
    where deptno(+) = dn
    union all
    select nvl (deptno, 0) deptno
      from (select :deptno2 dn from dual), scott.dept
    where deptno(+) = dn
      8  /
                DEPTNO
                    20
    1 row selected.
    Elapsed: 00:00:00.01
    TUBBY_TUBBZ?SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALL'));
    PLAN_TABLE_OUTPUT
    SQL_ID  ap0cr5cut2ucn, child number 0
    select nvl (deptno, 0) deptno   from (select :deptno1 dn from dual),
    scott.dept  where deptno(+) = dn union all select nvl (deptno, 0)
    deptno   from (select :deptno2 dn from dual), scott.dept  where
    deptno(+) = dn
    Plan hash value: 18139613
    | Id  | Operation            | Name               | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT     |                    |       |       |     2 (100)|          |
    |   1 |  NESTED LOOPS OUTER  |                    |     2 |    26 |     2   (0)| 00:00:01 |
    |   2 |   FAST DUAL          |                    |     1 |       |     2   (0)| 00:00:01 |
    |   3 |   VIEW               | VW_JF_SET$03B38961 |     2 |    26 |     0   (0)|          |
    |   4 |    UNION-ALL         |                    |       |       |            |          |
    |*  5 |     INDEX UNIQUE SCAN| PK_DEPT            |     1 |     3 |     0   (0)|          |
    |*  6 |     INDEX UNIQUE SCAN| PK_DEPT            |     1 |     3 |     0   (0)|          |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$51CD7FBE
       2 - SEL$51CD7FBE / DUAL@SEL$2
       3 - SET$03B38961 / VW_JF_SET$03B38961@SEL$7D8CA889
       4 - SET$03B38961
       5 - SEL$09480F13 / DEPT@SEL$1
       6 - SEL$05ED6B18 / DEPT@SEL$3
    Predicate Information (identified by operation id):
       5 - access("DEPTNO"=:DEPTNO1)
       6 - access("DEPTNO"=:DEPTNO2)
    Column Projection Information (identified by operation id):
       1 - "ITEM_1"[NUMBER,22]
       3 - "ITEM_1"[NUMBER,22]
       4 - STRDEF[22]
       5 - "DEPTNO"[NUMBER,22]
       6 - "DEPTNO"[NUMBER,22]
    46 rows selected.
    Elapsed: 00:00:00.05So we can see through rows 5 and 6 the predicates were pushed into DEPT query (which shouldn't have happened).
    A simple change to the query alleviates the bug.
    select
       nvl(d1.deptno, 0) as deptno
    from
       select :deptno1 dn from dual
          union all
       select :deptno2 dn from dual
    )  d,
       scott.dept d1
    where
    11     d.dn = d1.deptno (+)
    12  /
                DEPTNO
                    20
                     0
    2 rows selected.
    Elapsed: 00:00:00.01
    TUBBY_TUBBZ?SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY_CURSOR(NULL, NULL, 'ALL'));
    PLAN_TABLE_OUTPUT
    SQL_ID  4x59nkxusp1p8, child number 0
    select    nvl(d1.deptno, 0) as deptno from (    select :deptno1 dn from
    dual       union all    select :deptno2 dn from dual )  d,
    scott.dept d1 where    d.dn = d1.deptno (+)
    Plan hash value: 1564933512
    | Id  | Operation          | Name    | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT   |         |       |       |     4 (100)|          |
    |   1 |  NESTED LOOPS OUTER|         |     2 |    32 |     4   (0)| 00:00:01 |
    |   2 |   VIEW             |         |     2 |    26 |     4   (0)| 00:00:01 |
    |   3 |    UNION-ALL       |         |       |       |            |          |
    |   4 |     FAST DUAL      |         |     1 |       |     2   (0)| 00:00:01 |
    |   5 |     FAST DUAL      |         |     1 |       |     2   (0)| 00:00:01 |
    |*  6 |   INDEX UNIQUE SCAN| PK_DEPT |     1 |     3 |     0   (0)|          |
    Query Block Name / Object Alias (identified by operation id):
       1 - SEL$1
       2 - SET$1 / D@SEL$1
       3 - SET$1
       4 - SEL$2 / DUAL@SEL$2
       5 - SEL$3 / DUAL@SEL$3
       6 - SEL$1 / D1@SEL$1
    Predicate Information (identified by operation id):
       6 - access("D"."DN"="D1"."DEPTNO")
    Column Projection Information (identified by operation id):
       1 - "D1"."DEPTNO"[NUMBER,22]
       2 - "D"."DN"[NUMBER,22]
       3 - STRDEF[22]
       6 - "D1"."DEPTNO"[NUMBER,22]
    43 rows selected.
    Elapsed: 00:00:00.05
    TUBBY_TUBBZ?I ran these tests on
    TUBBY_TUBBZ?select * from v$version;
    BANNER
    Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
    PL/SQL Release 11.2.0.1.0 - Production
    CORE     11.2.0.1.0     Production
    TNS for Linux: Version 11.2.0.1.0 - Production
    NLSRTL Version 11.2.0.1.0 - Production
    5 rows selected.
    Elapsed: 00:00:00.02
    TUBBY_TUBBZ?

  • Display column value conditionally

    Hi all,
    I have a report with two columns and I would like to display the second column based on the value of the first one; if the first column is equal to 1 then show the second column :
    Col1 Col2
    0
    1 value
    1 value
    0
    0
    I tried to put a condition on column 2 but it doesn't work (Item in Expression1 = Expression 2), "value" is never displayed ...
    Best regards,
    Othman.

    This is the right way of doing things like that:
    SQL> SELECT deptno, CASE
      2            WHEN deptno = 20
      3               THEN ename
      4            ELSE NULL
      5         END ename
      6    FROM emp;
        DEPTNO ENAME
            30
            30
            10
            20 JONES
            20 SCOTT
            20 FORD
            20 SMITH
            30
            30
            30
            30
        DEPTNO ENAME
            10
            30
    13 Zeilen ausgewählt.Have a look at my demo application:
    http://htmldb.oracle.com/pls/otn/f?p=31517:1
    You will find a lot of examples there, doing the same thing.
    Denes Kubicek

  • How to display item when mouse moves over Column value??

    Hi there
    It would be helpful if you could resolve the following :
    i) I need to display the column 'A' values of my report in a Text field when mouse moves over column B of my report.
    ii) I can able to display the same column value when mouse moves over or onclick happens. but my requirement is something like i have to display the other column value when mouse moves over.
    iii) Also i noticed that, i can able to display the item only on "Display only Item" and not on Text field.
    Any pointers to display my column value in Text field when onclick happens on my report column?
    iv) One more thing that i noticed, i can able to perform onclick or mouse over only on Editable column and not on
    non editable columns.
    Any pointers on how to achieve the same when mouse moves over Non editable column of report?
    Reference: I have created a dummy application (refer the following link), where i can able to display column value Salary on display only item using mouse move Event.
    My requirement: when i click column Ename , the text field should show salary.
    http://apex.oracle.com/pls/otn/f?p=56045:1
    User:guest
    Pswd: apex_demo
    Any pointers on this would be appreciated.
    Thanks
    Vijay

    Vijay,
    If you use Jquery then this should do the trick.
    $(document).ready(function() {
       $(".t20Report t20Standard tr").hover(function() {
         $("#P2_SALARY").attr("innerHTML",$(this).find("td:last input").attr("value"));
    {code}
    after looking at the source of your page it seems that your class for your report region is *class="t20Report t20Standard"* I am not 100% sure but you might have to correct that in the template. I am not sure how the selector will handle the space in the class name.
    Hope this helps,
    Tyson                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • FSG report not printing column values on same line but sequentially

    FSG report problem:
    We have defined 2 FSG reports 'Balance Sheet - Total' and 'Balance Sheet - Detail'. Both reports have 3 column values, namely the value in Euro (our Functional Currency), the value in MUR - Mauritian rupees (our reporting currency) and the rate of exchange.
    The report 'Balance Sheet - Total' displays these values for assets e.g.:-
    EURO MUR Rate of exchange
    Non-current assets
    1. Intangible assets ? ? ?
    2. Other investments ? ? ?
    (note: ? represents a certain value)
    The report 'Balance Sheet - Detail' displays values as follows :-
    Account EURO MUR Rate of exchange
    1. Property & Equipment
    A10101 Building Cost ? 0.00 0.0000
    A20105 Motor Veh Accum Dep ? 0.00 0.0000
    TOTAL ? 0.00 0.0000
    A10101 Building Cost 0.00 ? n/m
    A20105 Motor Veh Accum Dep 0.00 ? n/m
    (note: ? represents a certain value)
    What we don't understand s why the 'Balance Sheet - Detail' report repeats the display of column values in MUR FOLLOWING the display in EURO, instead of displaying column values for EURO and MUR on the same line, just like in the case for 'Balance Sheet - Total'.
    Is there anything in the definition of column set, row set or report set should I change?
    Can anybody help. Thanks.
    null

    The problem is related to defining the column set properly. It is OK with the first report and needs modification for the second. Formatting is also important so that they appear in the same line(row). The columns need to be linked to the fileds and assignment to set of books is also important as mentioned by Rajsekhar

  • Update Column value after current item is Approved and then publish major version using Sharepoint 2013 designer workflow

    Hi,
    We have a requirement to update a column value once the item has been approved.
    Following settings have been made in the publishing articles list:
    Require content approval for submitted items : yes
    Create major and minor (draft) versions
    Who should see draft items in this document library? :Only users who can edit items
    Require documents to be checked out before they can be edited? : yes
    I have createdatu a Sharepoint 2013 workflow to check if Approval sts of current item = 0 i.e. Approved , then check out and update the item and finally checkin the item. Everything works fine till this point except that the minor version of the item is
    checked in. Due to this the updated columns are not published to others.
    Also, I created a Sharepoint 2010 workflow to SET CONTENT APPROVAL = APPROVED and started this workflow from my list workflow above, but the item does not get checked-in and always shows "In Progress" status with comment "The item is currently
    locked for editing. Waiting for item to be checked in or for the lock to be released.".
    Please let me know where I am missing out so that once the item is approved, column value gets updated and current item is still in Approved status.
    Thanks

    Hi,
    According to your post, my understanding is that you want to update Column value after current item is Approved and then publish major version using Sharepoint 2013 designer workflow.
    You will get into this kind of Catch-22 situation trying to set the Content Approval Status in SharePoint Designer workflow:
    - You must check out the document before you can change the Content Approval Status
             - You can't change the Content Approval Status once the document in checked out
    Since you set the Require documents to be checked out before they can be edited=Yes, you will need to check out the document when run the workflow on the item. But you cannot approve a document when it is checked
    out. So the logic in workflow conflicts.
    As a workaround, you can use the Start Another Workflow action to start the normal Approval workflow on the document.  The built-in Approval workflow can work with a document that’s not checked out.
    The designer approval workflow also can work with a document that’s not checked out.
    You can create two workflow using SharePoint Designer 2013.
    First, create a SharePoint 2010 platform workflow.
    Then, create a SharePoint 2013 platform workflow.
    Then when the SharePoint 2013 platform workflow start, it will start the SharePoint 2010 platform workflow to set content approval status, then the SharePoint 2013 platform workflow will update current item value.
    More information:
    SharePoint Designer Workflow Content Approval Issue
    SharePoint 2010 Approval Workflow with Content Approval
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • How to display field value only once in REUSE_ALV_GRID_DISPLAY

    hi experts,
                   i am using REUSE_ALV_GRID_DISPLAY, for alv outpur display.but i want one of the field in output ,not to display the value which is of same, it have to be displayed only once, I mean i have a number which contains multiple line items corresponding, here i want to display the field value only once when it is repeating , for the same header number, how can i achieve it

    Hi,
    check the sample code,
    REPORT  Z_ALV.
    Database table declaration
    TABLES:
      sflight.
    Typepool declaration
    TYPE-POOLS:
      slis.
    Selection screen elements
    SELECTION-SCREEN BEGIN OF BLOCK blk_1 WITH FRAME TITLE text-000.
    SELECT-OPTIONS:
      s_carrid FOR sflight-carrid.
    SELECTION-SCREEN END OF BLOCK blk_1.
    Field string to hold sflight data
    DATA:
      BEGIN OF fs_sflight ,
        carrid   TYPE sflight-carrid,      " Carrier Id
        connid   TYPE sflight-connid,      " Connection No
        fldate   TYPE sflight-fldate,      " Flight date
        seatsmax TYPE sflight-seatsmax,    " Maximum seats
        seatsocc TYPE sflight-seatsocc,    " Occupied seats
      END OF fs_sflight.
    Internal table to hold sflight data
    DATA:
      t_sflight LIKE
       STANDARD TABLE
             OF fs_sflight .
    Work variables
    DATA:
      t_fieldcat TYPE  slis_t_fieldcat_alv,
      fs_fieldcat LIKE
             LINE OF t_fieldcat.
    *START-OF-SELECTION
    START-OF-SELECTION.
      PERFORM get_data_sflight.            " Getting data for display
      PERFORM create_field_cat.            " Create field catalog
      PERFORM alv_display.
    *&      Form  create_field_cat
          Subroutine to create field catalog
          There is no interface paramete
    FORM create_field_cat .
      PERFORM fill_fieldcat USING   'Carrier Id'    'CARRID'   '2'.
      PERFORM fill_fieldcat USING   'Connection No' 'CONNID'   '1'.
      PERFORM fill_fieldcat USING   'Flight Date'   'FLDATE'   '3'.
      PERFORM fill_fieldcat USING   'Maxm.Seats'    'SEATSMAX' '4'.
      PERFORM fill_fieldcat USING   'Seats Occ'     'SEATSOCC' '5'.
    ENDFORM.                                    "create_field_cat
    *&      Form  fill_fieldcat
          Subroutine to fill data to field column
         -->p_seltext      Column label
         -->p_fieldname    Fieldname of database table
         -->p_col_pos      Column position
    FORM fill_fieldcat  USING
                        p_seltext    LIKE fs_fieldcat-seltext_m
                        p_fieldname  LIKE fs_fieldcat-fieldname
                        p_col_pos    LIKE fs_fieldcat-col_pos.
      fs_fieldcat-seltext_m  = p_seltext.
      fs_fieldcat-fieldname  = p_fieldname.
      fs_fieldcat-col_pos    = p_col_pos.
      APPEND fs_fieldcat TO t_fieldcat.
      CLEAR fs_fieldcat.
    ENDFORM.                    " fill_fieldcat
    *&      Form  get_data_sflight
          Subroutine to fetch data from database table
          There is no interface parameter
    FORM get_data_sflight .
      SELECT carrid
             connid
             fldate
             seatsmax
             seatsocc
        FROM sflight
        INTO TABLE t_sflight
       WHERE carrid IN s_carrid.
    ENDFORM.                    " get_data_sflight
    *&      Form  alv_display
          Subroutine for ALV display
          There is no interface parameter
    FORM alv_display .
      CALL FUNCTION 'REUSE_ALV_LIST_DISPLAY'
        EXPORTING
          it_fieldcat   = t_fieldcat
        TABLES
          t_outtab      = t_sflight
        EXCEPTIONS
          program_error = 1
          OTHERS        = 2.
      IF sy-subrc NE 0.
        MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
                WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      ENDIF.
    ENDFORM.                    " alv_display
    End of code

  • Problem in displaying multiple column values using Narrative View

    Hi All,
    I have a requirement where in I need to display column 1 of an Answers report as a header and all values of column 2 below tht.
    There are multiple values from column 2 for every value in column 1
    Example:
    Group:
    Grp (This is column 1)
    Activity:
    Act1
    Act2
    Act3 (These are values from column 2)
    I have used narrative view for this which looks like:
    Group: @1
    Activity:@2[br/]
    But this displays the value of column1 along with every value of column 2. I want column 1 value to be displayed only once.
    Thanks in advance
    Radhika

    Hi see this link it may helpful
    Re: Narrative view not showing up in the report
    Re: how to transpose columns to rows in OBIEE
    Regards
    Naresh

  • How to refer a column value of a single row in conditional column display?

    Hello,
    does anybody have an idea, how i can refer a column value of a single row in conditional display of a column?
    So my idea is, that a report has a column, which value is only displayed, when another column value of this row has a specific value.
    I want to solve this problem with condition type: PL/SQL Function Body returning a boolean.
    But I do not know how to refer the column value of each single row!
    Thank you,
    Tim

    Here's a solution that, to me, seems easier to implement but, that's, of course, in the eye of the implementer.
    Rather than using APEX to generate a link column for you, actually create the link as part of your SQL.
    select '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>' CONTACT_LINK, ...
    etc.
    Test this out. You'll see that it works just like making a column a link using the column attributes.
    Next, we'll change the SQL to use a DECODE statement to either display the link or nothing depending on what your criteria is. For example, let's assume you only want a link for active contacts.
    select Decode( CONTACT_STATUS, 'A', '<a href="f?p=102:3:491847682940364::::P3_CONTACT_ID:' || CONTACT_ID || "><img src="/i/themes/theme_1/ed-item.gif" alt="Edit"></a>', NULL ) CONTACT_LINK, ...
    etc.
    This will not display the link in any rows in which the CONTACT_STATUS is not active, i.e. "A"
    -Joe

  • How to display the value of a column in a chart at the top of each column

    How to display the value of each column in a chart at the top of each column?

    Like this?
    Done using chart Inspector.
    For details, see Chapter 7,  Creating Charts from Numerical Data in the Numbers '09 User Guide. The guide may be downloaded via the Help menu in Numbers.
    Regards,
    Barry

  • How to add a column to a list created with the Dynamic List Wizard to display the values of the fiel

    Hi,
    ADDT, Vista, WAMP5.0
    We have 2 tables: clients_cli (id_cli, name_cli, tel_cli, and several more fields) and cases_cas (id_cas, idcli_cas, court_cas, and a lot of other fields).
    Clients may have many cases, so table cases_cas have a foreign key named idcli_cas, just to determine which case belongs to which client.
    We designed the lists of the two tables with the Dynamic List Wizard and the corresponding forms with Dynamic Form Wizard.
    These two forms are linked with the Convert Dynamic List and Form Wizards, which added a button to clients list named "add case".
    We add a client and then the system returns to the clients list displaying all clients, we look for the new client just added and then press "add case", which opens the Dynamic Form for cases, enter all case details and everything processes ok.
    However, when we view the cases list it display all the details of the case, including the column and values for the foreign key idcli_cas. As you can image, it is quite difficult for a human to remember the clients ids.
    So, in the cases list we added a another column, named it Name, to display the names of the clients along with cases details. We also created another recordset rsCli, selected the clients_cli table, displaying all columns, set filter id_cli = Form Variable = idcli_cas then press the Test button and everything displays perfect. Press ok.
    Then, we position the cursor inside the corresponding cell of the new Name column, go to Bindings, click on name_cli and then click on insert. The dynamic field is inserted into the table cell as expected, Save the page, and test in browser.
    The browser call the cases list but fails to display the values of the Name column. The Name column is simply empty.
    This issue creates a huge problem that makes our application too difficult to use.
    What are we doing wrong?
    Please help.
    Charles

    1.     Start transaction PM01, Create Infotype, by entering the transaction code.
    You access the Create Infotype screen.
    2.     Choose List Screen.
    3.     In the Infotype no. field, enter the four-digit number of the infotype you want to create.
    When you specify the infotype number, please remember to enter any leading zeros.
    4.     In the Screen Number field, enter the screen number of the list screen you want to enhance.
    5.     Choose Create.
    The Dictionary: Initial screen appears:
    6.     Create the list screen structure.
    7.     Choose Activate.
    8.     Return to the Enhance List Screen in the Enhance Infotypes transaction (PM01).
    9.     Choose Create All.
    The additional fields are displayed on the list screen, however, they contain no data.
    The fields can be filled in the FORM routine FILL-LISTSTRUCT in the generated program ZPnnnn00. The FORM routine is called for each data record in the list.
    Structure ZPLIS is identified when it is generated with a TABLES statement in the program ZPnnnn00.
    The fields can be filled from the Pnnnn structure or by reading text tables.

  • Display hperlink in report based on column values

    Hi,
    I have a requirement to make report column as hyperlink column with the condition that
    1 . If report column values is 0 then on '0' hyperlink should not display.
    2 . In other values hyperlink should display.
    Please help me to achive this.
    Thanks & Regards,
    Priya

    select decode ( col1, 0, null, '{a href="f?p=&APP_ID.:XX:'||'&SESSION.'||'::::ID:'||col1||':YES" }Go{a}' as Link, col2, col3 from table
    XX is your linked page number.
    Replace { to <
    and
    } to >

  • "Item Containing Primary Key Column Value" does not display records

    Hello,
    We are developing a new page where an "Automated Row Fetch" process is needed.
    With other pages we experienced no issues. But with a new one, when defining the value for the field “Item Containing Primary Key Column Value”, Apex displays no rows.
    As far as we know, Apex should display all the fields defined for the page. Is there any property which affects the fields visibility?
    The affected page has textarea and text fields.
    Thanks in advance.

    Hello,
    Sorry, we have already detected that the problem was at field definition.
    Fields should be defined as "Source Type: Database Column". They were wrong defined.
    Thanks.

Maybe you are looking for

  • Error while scheduling Background Job for User/Role Full Synchronization

    Hi all, We have installed RAR 5.3 Component and uploaded the authorization data & established the connectors to the backend system. We have performed all the post installation activities and everything is complete. When we have scheduled User -Full S

  • Receiving attachments as jarbled text in body of email.

    Is there a setting in the Mail preferences that deals with receiving attachments in the body of the email? I have been trying to send an xls. attachment to a Tiger based imac and they get the file as 200 lines of text instead of a file. Is there a se

  • Javax.resource.cci interface

              Hi.           I´m getting a bit frustrated by now. My contact at BEA wont answer my questiona...           I am (still) trying to get my adapter to work on WL 6.1 SP1-2.           The adapter I´m using (trying anyway) implements the javax.r

  • Need keynote for mac OS 10.8

    I need to get Keynote for my mac, but I will not get clearance from the company I work for to upgrade to Maverick until it has been out for a while.  New Keynote states it requires Maverick.  Do I have any options?

  • Making a simple ticking clock in AS3 with .as files

    I'm making a simple clock in AS3 as seen on youtube (Doug Winnie) but I want to put the code into separate .as files. This is what I have so far but I keep getting the error 1046: Type was not found or was not a compile time constant: secondHand. But