Selecting rows as columns

Hi,
I've got a challenge. I need to select row data as columns.
Suppose, I have this:
CREATE TABLE master
  id NUMBER,
  name VARCHAR2(50),
  CONSTRAINT pk_master PRIMARY KEY(id) 
CREATE TABLE detail
  id NUMBER,
  master_id,
  type VARCHAR2(10),
  value NUMBER,
  CONSTRAINT pk_detail PRIMARY KEY(id),
  CONSTRAINT fk_master FOREIGN KEY(master_id)
       REFERENCES master(id),
  CONSTRAINT c_type CHECK (type IN ('apple','orange'))
);Now, suppose master and detail holds the following data:
Master:
ID  NAME
1   Jill
2   Jack
Detail:
ID  MASTER_ID TYPE      VALUE
1   1         apple     120
2   1         orange    230
3   2         apple     10Here comes the challenge: what do I have to put in a selectstatement, to get this result:
NAME    APPLE    ORANGE
Jill    120      230
Jack    10I know what types there are up front (only apple and orrange), so the query may use that knowledge.
Bonus guru points however to the one who can make a generic query that can convert the type rows into columns generically, regardless of what and how many types there are.

scott@ORA92> -- test data:
scott@ORA92> SELECT * FROM master
  2  /
        ID NAME
         1 Jill
         2 Jack
scott@ORA92> SELECT * FROM detail
  2  /
        ID  MASTER_ID TYPE            VALUE
         1          1 apple             120
         2          1 orange            230
         3          2 apple              10
scott@ORA92> -- PL/SQL for any number of values of type (apple, orange, etc.):
scott@ORA92> VARIABLE g_ref REFCURSOR
scott@ORA92> DECLARE
  2    v_sql VARCHAR2(32767);
  3  BEGIN
  4    v_sql := 'SELECT master.name';
  5    FOR rec IN (SELECT DISTINCT type FROM detail) LOOP
  6        v_sql := v_sql
  7        || ',SUM(DECODE(type,''' || rec.type || ''',value)) ' || rec.type;
  8    END LOOP;
  9    v_sql := v_sql
10    || ' FROM   master, detail'
11    || ' WHERE  master.id = detail.master_id'
12    || ' GROUP  BY master.name';
13    OPEN :g_ref FOR v_sql;
14  END;
15  /
PL/SQL procedure successfully completed.
scott@ORA92> PRINT g_ref
NAME                                                    APPLE     ORANGE
Jack                                                       10
Jill                                                      120        230
scott@ORA92>

Similar Messages

  • How to set the Selected row and Column in JTable

    Hi,
    i have a problem like the JTable having one Method getSelectedRow() and getSelectedColumn to know the Selected row and Column but if i want to explicitly set the Selected Row and Column,then there is no such type of Methods.If anybody has any solution then i will be thankful to him/her.
    Praveen K Saxena

    Is that what you're looking for? :myTable.getSelectionModel().setSelectionInterval(row, row);
    myTable.getColumnModel().getSelectionModel().setSelectionInterval(column, column);

  • Select row and column from header in jtable

    hello i have a problem to select row and column from header in jtable..
    can somebody give me an idea on how to write the program on it.

    Hi Vicky Liu,
    Thank you for your reply. I'm sorry for not clear question.
    Answer for your question:
    1. First value of Open is item fiels in Dataset2 and this value only for first month (january). But for other month Open value get from Close in previous month.
    * I have 2 Dataset , Dataset1 is all data for show in my report. Dataset2 is only first Open for first month
    2. the picture for detail of my report
    Detail for Red number:
    1. tb_Open -> tb_Close in previous month but first month from item field in Dataset2
    espression =FormatNumber(Code.GetOpening(Fields!month.Value,First(Fields!open.Value, "Dataset2")))
    2. tb_TOTAL1 group on item_part = 1
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)))
    3. tb_TOTAL2 group on item_part = 3 or item_part = 4
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) + ReportItems!tb_TOTAL1.Value )
    4. tb_TOTAL3 group on item_part = 2
    expression =FormatNumber(Sum(CDbl(Fields!budget.Value)) - ReportItems!tb_TOTAL2 .Value)
    5. tb_Close -> calculate from tb_TOTAL3 - tb_Open
    expression =FormatNumber(Code.GetClosing(ReportItems!tb_TOTAL3.Value,ReportItems!tb_Open.Value))
    I want to calculate the value of tb_Open and tb_Close. I try to use custom code for calculate them. tb_close is correct but tb_Open is not correct that show value = 0 .
    My custom code:
    Dim Shared prev_close As Double
    Dim Shared now_close As Double
    Dim Shared now_open As Double
    Public Function GetClosing(TOTAL3 as Double,NowOpening as Double)
        now_close = TOTAL3 + NowOpening
        prev_close = now_close
        Return now_close
    End Function
    Public Function GetOpening(Month as String,NowOpen as Double)
        If Month = "1" Then
            now_open = NowOpen
        Else    
            now_open = prev_close
        End If
        Return now_open
    End Function
    Thanks alot for your help!
    Regards
    Panda A

  • An unusual select rows as columns...

    Colleagues,
    I could really use some help on this one. Thanks in advance for all your help.
    Here is what I have:
    the input (create and insert scripts provided below) is:
    ID SCHEMA_ID TBL_ID TBL_COLS_ID COLUMN_VALUE
    =============================================
    100 1 1 76 0
    101 1 1 77 ABCD
    102 1 1 76 0
    103 1 1 77 DEF
    COLUMN NAMES:
    TBL_COLS_ID 76 = 'KEY'
    TBL_COLS_ID 77 = 'KEYVAL'
    End result I am looking for is to select rows into columns like:
    ALSO, I would like to know how this can be done in a dynamic way within a PLSQL procedure as there are multiple tables and columns in each table are different.
    SCHEMA_ID TBL_ID KEY KEYVAL
    =============================
    1 1 0 ABCD
    1 1 0 DEF
    select schema_id,tbl_id,
    decode( tbl_cols_id, 76, COLUMN_VALUE, null) KEY,
    decode( dr_table_cols_id, 77, COLUMN_VALUE, null) KEYVAL
    from items where schema_id =1
    and tbl_id =1
    CREATE TABLE ITEMS(
    ID NUMBER NOT NULL,
    SCHEMA_ID NUMBER,
    TBL_ID NUMBER,
    TBL_COLS_ID NUMBER,
    COLUMN_VALUE VARCHAR2 (30)
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151056, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151057, 1, 1, 77, 'ABCD');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151058, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151059, 1, 1, 77, 'XYZ ');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151060, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151061, 1, 1, 77, 'DEF');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151062, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151063, 1, 1, 77, 'TNT ');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151064, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151065, 1, 1, 77, 'CD ');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151066, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151067, 1, 1, 77, 'NN ');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151068, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151069, 1, 1, 77, 'BCDA');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151070, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151071, 1, 1, 77, 'GAG ');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151072, 1, 1, 76, '0');
    Insert into items
    (ID, SCHEMA_ID, TBL_ID, TBL_COLS_ID, COLUMN_VALUE)
    Values
    (151073, 1, 1, 77, 'ABC1');
    Thank you.

    If I understand correctly, you want to pair up successive records to match the key and value pairs. Assuming that each successive pair of id's (e.g. 151056/76 and 151057/77) go together, then something like tthis should do it. Not that I replaced your 0 in the records for the 76 column values with the id just to make sure that the rows were pairing correctly.
    SQL> SELECT schema_id, tbl_id, key, keyval
      2  FROM (
      3  SELECT schema_id,tbl_id,
      4         DECODE( tbl_cols_id, 76, COLUMN_VALUE, null) KEY,
      5         LEAD(DECODE( tbl_cols_id, 77, COLUMN_VALUE, null),1)
      6         OVER (ORDER BY ID) KEYVAL
      7  FROM items
      8  WHERE schema_id =1 and
      9        tbl_id =1)
    10  WHERE key IS NOT NULL and
    11        keyval IS NOT NULL;
    SCHEMA_ID     TBL_ID KEY          KEYVAL
             1          1 151056       ABCD
             1          1 151058       XYZ
             1          1 151060       DEF
             1          1 151062       TNT
             1          1 151064       CD
             1          1 151066       NN
             1          1 151068       BCDA
             1          1 151070       GAG
             1          1 151072       ABC1TTFN
    John

  • How to select rows or columns of tables without using the mouse?

    2nd post ever! Yeah! \m/
    In Excel, I can select entire rows or columns of data WITHIN TABLES--i.e., not selecting entire sheet rows or columns--by going to any cell on the perimeter of the table, holding down shift+ctrl, and clicking a direction arrow. So for example, if I have a table in columns D-G and rows 1-5, I can highlight row 4 by going to the first or last cell of that row, holding down the shift+ctrl, and hitting the appropriate direction arrow. You might think this is superfluous given that you can use the mouse to select cells. But that becomes cumbersome with large tables, and this method can be more efficient even with small tables.
    Similarly, it's often useful to navigate tables, particularly large ones, by moving from any cell within the table to the end or beginning of that row or column by holding down ctrl and hitting the appropriate arrow key. In Excel, this ctrl+arrow key method also allows you to skip blank cells, which is another very useful navigational feature.
    I tried numerous combos involving shift, ctrl, command, alt/option and the arrow keys. Haven't found a way to do any of this yet.
    Anyone?

    Hi Josh,
    Numbers is organized differently than Excel, and the navigation tools are different too. Many of us miss our particular favorites from spreadsheets past, but this is Numbers, not a clone. The biggest adjustment is to go from huge monolithic sheet-tables containing virtual sub-tables to a simple blank sheet with small tables, sometimes many per sheet. Navigating is no big deal in these small tables and neither is getting from one small table to another, using the Sheets pane.
    Selecting a particular Table is as easy as clicking on the table's name in the Sheets pane. Selecting a particular row, or column, or ranges of rows or columns is done by clicking on the table's row and column labels, left side and top side once a cell is selected in the table.
    Numbers is weak at handling large Tables and documents that are large overall. We know this and many of us still prefer it to the alternative when the tool fits the task.
    Jerry

  • Summing Selected Rows in Column Depending on Value in Another Column

    I'd like to sum only the values in selected rows in a given column depending on the value of another column in the same row. For example, suppose I have a table (please disregard the underscores, needed for correct alignment):
    ___A____B____C___D
    1__5___10___15___0
    2_20___25___30___1
    3_35___40___45___1
    4_50___55___60___0
    5__sum(D=1)
    In cell B5, I'd like to compute the sum of only rows in column B for which the value of the corresponding column D is 1. In this case B5 would be 65.
    How can I do this using functions? Is it possible to do it for a variable range of rows without specifying each row individually?
    Thanks,
    Dave

    You should place your formula to other collumn then calculated ones or in another table. You will be able to calculate whole collumns with: =SUMIF(D;“=1”;B)
    Formula for your example is: =SUMIF(D1:D4;“=1”;B1:B4)
    VB

  • JTable: Selecting rows in columns independently

    Dear all,
    I have a JTable with two columns. I want the user to be able to select cells in columns independently. At present, the entire row gets marked as selected. Is it possible at all to, for instance, select row1 1 to 3 in column 1 and rows 4 to 5 in column 2? If so, where's the switch? Thanks a lot in advance!
    Cheers,
    Martin

    Are you trying to use a seperate table for each column.
    Thats not a good idear.
    Here is what you have to do.
    1. Create a sub class of JTable
    2. You will have to redefine how the selection is done so. You will need some sort of a collection to store the list of selected cells indexes
    2.1 Selecting a cell is simply adding the coordinations of the cell to the selection
    2.2 de selecting is just removing it from the collection.
    2.3 Here is what you have to override
         setColumnSelectionInterval()
         setColumnSelectionInterval()
         changeSelection()
         selectAll()
         getSelectedColumns()
         getSelectedColumn()
         getSelectedRows()
         getSelectedRow() You migh also need few new methods such as
         setCellSelected(int row, int column, boolean selected);
         boolean isCellSelected(int row, int column);
         clearSelection();
         int[][] getSelectedCells();You will have to implement the above in terms of your new data structure.
    3. Handle mouse events.
    Ex:- when user cicks on a cell if it is already selected it should be deselected (see 2.2)
    other wise current selected should be cleared and the clicked cell should be selected
    if your has pressed CTRL key while clicking the the cell should be selected without deselecting the old selection.
    ---you can use above using a MouseListener
    When the user hold down a button and move the mouse accross multiple cell those need to be selected.
    --- You will need a MouseMotionListener for this
    You might also need to allow selection using key bord. You can do that using a KeyListener
    4. Displaying the selection
    You have to make sure only the selected cells are high lighted on the table.
    You can do this using a simple trick.
    (Just override getCellEditor(int row, int column) and getCellRenderer(int row, int column) )
    Here is what you should do in getCellRenderer(int row, int column)
    public TableCellRenderer getCellRenderer(int row, int column)
      TableCellRenderer realRenderer = super.getCellRenderer(int row, int);
      return new WrapperRenderer(realRenderer,selectedCellsCollection.isCellSelected(row,column));
    static class WrapperRenderer implements TableCellRenderer{
        TableCellRenderer realRenderer;
        boolean selected;
        public WrapperRenderer(TableCellRenderer realRenderer, boolean selected){
           this.realRenderer = realRenderer;
           this.selected = selected;
        public Component getTableCellRendererComponent(JTable table,
                                                   Object value,
                                                   boolean isSelected,
                                                   boolean hasFocus,
                                                   int row,
                                                   int column){       
            return realRenderer.getTableCellRendererComponent(table,value,selected,hasFocus,row,column);
    }What the above code does is it simply created wrapper for the Renderer and when generating the rendering component it replaces the isSeleted flag with our on selected flag
    and the original renderer taken from the super class will do the rest.
    You will have to do the same with the TableCellEditor.
    By the way dont use above code as it is becouse the getCellRenderer method create a new instance of WrapperRenderer every time.
    If the table has 10000 cells above will create 10000 instances. So you should refine above code.
    5. Finnaly.
    Every time the selection is changes you should make the table rerender the respective cells in or der to make the changes visible.
    I'll leave that part for you to figure out.
    A Final word
    When implementing th above make sure that you do it in the java way of doing it.
    For the collection of selected cells write following classes
    TableCellSelectionModel  // and interface which define what it does
    DefaultTableCellSelectionModel //Your own implementation of above interface the table you create should use thisby default
    //To communicate the selection changes
    TableCellSelectionModelListener
    TableCellSelectionModelEventif you read the javadoc about similer classes in ListSelectionModel you will get an idear
    But dont make it as complex as ListSelectionModel try to keep the number of methods less than 5.
    If you want to make it completly genaric you will have to resolve some issues such as handling changes to the table model.
    Ex:- Rows and colums can be added and removed in the TableModle at the run time as a result the row and column indexes of some cells might change
    and the TableCellSelectionModel should be updated with those changes.
    Even though the todo list is quite long if you plan your implementation properly the code will not be that long.
    And more importantly you will learn lots more by trying to implementing this.
    Happy Coding :)

  • Make Select rows and columns as read only in Table Control

    Hi All,
    I would like to know how to make certain cells in a Table Control as display only.
    Table control should look like-(Those in bold are read only or in display mode)
    <b>Name1            Idno1 </b>         Address1
    <b>Name2            Idno2</b>          Address2
    <b>Name3            Idno3  </b>        Address3
    <b>Name4            Idno4</b>          Address4
    (Blank row to enter name idno and address)
    (Blank row to enter name idno and address)
    (Blank row to enter name idno and address)
    My table control should display all the above fields the way it is above of which first two colums and 4 rows should be read only,and the rest of the empty rows in the TC should be in change mode.i.e it must have provision to add new rows but not change the first two columns of existing rows.
    In short I am looking at solution to hide particular no of rows and columns and <b>not the entire column.</b>

    In the PBO of the table control loop. just write these statements
    NAME and IDNO considering the fields on the screen.
    and WA_TAB is the table work area being passed to the table control to display the rows.
    if not WA_TAB-NAME is initial and not WA_TAB-IDNO is initial.
    loop at screen.
    if screen-name = 'NAME' or
       screen-name = 'IDNO'.
    screen-input = <b>0</b>.
    modify screen.
    endif.
    endloop.
    endif.
    which means that the fields are disabled only if NAME and IDNO are not initial.
    Regards
    - Gopi

  • Selecting rows as columns in sql table

    i have sql table like 
    currcode    currdesc                  mth    yr        rate
    SGD          SINGAPORE DOLLAR    01    2013      .02
    SGD          SINGAPORE DOLLAR    09    2013      .02  (suppose have rates only for jan and sept )
    RMB          CHINESE RENMINBI     01    2013      .206
    RMB          CHINESE RENMINBI     02    2013      .207
    For each currency rates for 12 months for every year
    i want to show like (user will select the year)
    currcode    currdesc                      Jan       Feb     Mar    Apr     May    Jun    Jul    Aug    
    Sept   oct   nov  Dec
    SGD          SINGAPORE DOLLAR     .02                                                    
                                .02
    RMB          CHINESE RENMINBI      .206      .207
    h2007

    you can use either of the below
    1. Using PIVOT operator
    SELECT currcode,
    currdesc,
    Yr,
    [01] AS Jan,
    [02] AS Feb,
    [03] AS Mar,
    [11] AS Nov,
    [12] AS Dec
    FROM Table t
    PIVOT (MAX(rate) FOR mth IN ([01],[02],[03],[04],..,[11],[12]))p
    2. using classical cross tab logic
    SELECT currcode,
    currdesc,
    yr,
    MAX(CASE WHEN mth = '01' THEN rate END) AS Jan,
    MAX(CASE WHEN mth = '02' THEN rate END) AS Feb,
    MAX(CASE WHEN mth = '03' THEN rate END) AS Mar,
    MAX(CASE WHEN mth = '11' THEN rate END) AS Nov,
    MAX(CASE WHEN mth = '12' THEN rate END) AS Dec
    FROM table
    GROUP BY currcode,currdesc,yr
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    Thank u for helping. Your 2nd solution working great. But using Pivot table giving me 2 rows,
    RMB CHINESE RENMINBI
    2013 NULL
    NULL NULL
    0.206  NULL  NULL
    RMB CHINESE RENMINBI
    2013 NULL
    NULL NULL
    NULL  NULL
      0.207
    h2007
    Do you've any additional columns you've not shown in the post above?
    to change NULLs to 0 use this
    SELECT currcode,
    currdesc,
    yr,
    MAX(CASE WHEN mth = '01' THEN rate ELSE 0.00 END) AS Jan,
    MAX(CASE WHEN mth = '02' THEN rate ELSE 0.00 END) AS Feb,
    MAX(CASE WHEN mth = '03' THEN rate ELSE 0.00 END) AS Mar,
    MAX(CASE WHEN mth = '11' THEN rate ELSE 0.00 END) AS Nov,
    MAX(CASE WHEN mth = '12' THEN rate ELSE 0.00 END) AS Dec
    FROM table
    GROUP BY currcode,currdesc,yr
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • Select rows as columns

    Hi,
    I have this code:
    declare
    cursor c1 is
    select distinct manager_id
    from departments;
    begin
    for i in c1 loop
    execute immediate 'select department_name,
      (case ' ||i.manager_id ||
         ' when '|| i.manager_id ||
         ' then '|| i.manager_id ||' end ) ' || i.manager_id ||
    ' from departments; '
    end loop;
    end;Can you tell me what is wrong here?
    The error message is
    ERROR at line 12:
    ORA-06550: line 12, column 1:
    PLS-00103: Encountered the symbol "END" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    return returning <an exponent (**)> <> or != or ~= >= <= <>
    and or like between into using || bulk member SUBMULTISET_
    The symbol ";" was substituted for "END" to continue.
    Thank you

    Hi,
    The error message is because you do not have a semi-colon after the EXECUTE IMMEDIATE statement.
    The syntax for EXECUTE IMMEDIATE is
    EXECUTE IMMEDIATE  sql_txt;The string sql_txt does not (usually) end with a semi-colon, but the statement does.
    If you fix that, you still have the problem of trying to execute a SELECT statement. You need to either SELECT INTO some varaible, or dynamically create a cursor.
    It's very suspicious that manager_id is never quoted in the dynamic SQL statement.
    Whenever you develop something using EXECUTE IMMEDIATE, you should build the string first, creating one aVARCHAR2 variable. Then before (or instead of) executing it, display it. For example:
    declare
         cursor c1 is
                select distinct manager_id
                from departments;
         sql_txt   VARCHAR2 (2000);
    begin
         for i in c1 loop
             sql_txt := 'select department_name,
                   (case ' ||i.manager_id ||
                   ' when '|| i.manager_id ||
                   ' then '|| i.manager_id ||
                   ' end ) ' || i.manager_id ||
                   ' from departments'          -- no semicolon at the end of sql_txt
                   ;                              -- semicolon at the end of statement
             dbms_output.put_line (sql_txt);
             -- execute immediate sql_txt;          -- un-comment later, when you it looks good
         end loop;
    end;What are you trying to do here? What is the desired output or results of this PL/SQL block? In what you posted, no tables were changed and no text was written. If it hadn't gotten an error message, how would you know if it worked or not?

  • Multiple Rows and Columns selection on ALV

    Hi all,
    What is the best solution to allow the multiple selection or combination of selection (rows and columns) on an ALV ?
    I would like to be able to select some rows and some columns and to get the result cells in order to update them.
    Thanks in advance for your help.
    David

    Thanks Srinivas and Seela,
    I forgot to precise that my ALV is dynamic, I used the method 'add_new_child_node'.
    I tried the different possibilties with method attributes but I don't find the good attributes combination to allow columns selection.
    I add also that I have to be able to select several no adjacent columns.
    What do you think about this workaround :
    Is it possible to add a line on my ALV with checkbox between the header line (with column title) and data line.
    I will search using the method add_cell_variant but I don't know if it's possible with dynamic ALV.
    Thanks.
    David

  • Row and Column Template in Hyperion Reporting

    Hi
    Whenver I am trying to save a column of a report as a template , it is giving an error :
    "The selected columns contain one or more of the items below that cannot be included in templates:
    Invalid Input "
    I am not sure what does this mean. Though I have already deselected the "Link to Source Object". Can anyone suggest ?

    it may also worth cross checking below form doc:
    a.If your row and column template contains formulas with external references (for
    example, to cells outside of the selected row and column template), you are prompted
    to modify those formulas before saving the row or column template.
    Note: You can save a row and column template that contains cell formulas, as these can
    be discarded. For more information, see step 9.c on page 115.
    b. If a secondary database connection was specified within the row and column template,
    a dialog box displays prompting you to continue saving the template. If you save the
    template, the secondary database connection you specified in the row and column
    template is discarded. The primary database connection is then used for the row and
    column template.
    c. If unsupported properties are found, an Information dialog box presents a list of
    properties to discard before saving the template. For example, if the row and column
    template contains a cell formula, you can choose to save the template without the
    formula or not save the template.

  • Hyperion Reports - Row and Column templates

    <p>Sorry if this may be a bit basic but we are new to Hyperionreports. Currently we are going through a redesign process and washoping to get some viewpoints on the benefits of using row andcolumn templates within reports. I am looking at this option butgetting frustrated by the limitations around formatting, etc</p><p> </p><p>Are there any views out there on the preferred options. We havea particular style in design we need to include which is becomingdifficult when we use row and column templates</p>

    it may also worth cross checking below form doc:
    a.If your row and column template contains formulas with external references (for
    example, to cells outside of the selected row and column template), you are prompted
    to modify those formulas before saving the row or column template.
    Note: You can save a row and column template that contains cell formulas, as these can
    be discarded. For more information, see step 9.c on page 115.
    b. If a secondary database connection was specified within the row and column template,
    a dialog box displays prompting you to continue saving the template. If you save the
    template, the secondary database connection you specified in the row and column
    template is discarded. The primary database connection is then used for the row and
    column template.
    c. If unsupported properties are found, an Information dialog box presents a list of
    properties to discard before saving the template. For example, if the row and column
    template contains a cell formula, you can choose to save the template without the
    formula or not save the template.

  • Check box als column in a standard table, how to get the selected row

    Dear experts,
    I habe standard tablt with check box as column. Now I want to get the current selected row structure and do some changes. How could I solve this problem? till now I just know to get the structure via lead selection.
    lo_node->get_element().
    lo_element = lo_node->get_static_attributes ( static_attributes = ls_row).
    How could I get the element through check-box in stead of lead selection. Many thanks!

    check this code
    To get the selected row number
    data: lr_element type ref to if_wd_context_element,
              lv_index type i.
      lr_element = wdevent->get_context_element( name = 'CONTEXT_ELEMENT'  ).
      lv_index = lr_element->get_index( ).
    Thanks
    Bala Duvvuri

  • How to get column value of a selected row of ALV

    Hello ,
    I have application POWL POWL_UI_COMP uses  another component  POWL_TABLE_COMP.
    This POWL_TABLE_COMP uses SALV_WD_TABLE.
    I want to select value of ORDER id and it need to be passed whenever user selects a display order button(Which is self defined function generated in POWL_TABLE_COMP) . I am calling a display order on action of this display button(http://nap60.nalco.one.net:8042/sap/bc/webdynpro/sap/mt_order_app?IV_ACTIVITYTYPE=A&IV_EQUIPMENT=aaaa&IV_ORDERID=90001511&IV_ORDERTYPE=STD&IV_QMNUM=00&IV_TPLNR=00)
    ORDERID is one column value of selected row of ALV table.
    So please can you suggest , how to read ORDERID and pass it to the self defined function..
    thanks in advance,
    Sharada

    Anoop,
    I have plcaed this code in event handler of  on_lead_select.
    Its giving error  the element doesnt exist. 
    static_attributes should give me row data but it's giving short dump saying
    Pl can you suggest.
    data:   set_of_element type WDR_CONTEXT_ELEMENT_SET,
            element1 type ref to IF_WD_CONTEXT_ELEMENT,
            result type POWL_CRESULT_STY,
            table_helper type ref to CL_POWL_TABLE_HELPER,
          context_node type ref to IF_WD_CONTEXT_NODE,
           lt_selected_elements TYPE wdr_context_element_set,
           static_attributes type ref to data.
      table_helper = wd_comp_controller->mr_table_helper.
      context_node = table_helper->get_data_node( ).
      context_node = wd_comp_controller->mr_table_helper->get_data_node( ).
      context_node->get_static_attributes( exporting index = r_param->index
                                          importing static_attributes = static_attributes ).
    thanks,
    Sharada

Maybe you are looking for

  • DMS Connector for KM - index issues - single sign on

    We are at EP 7.0 SPS 14 with an ECC at 5.0. I had our basis install the BP DMS ConnectorKM 1.0 and then the support pack BPDMSCONN01 9-20000787.sca. I wound up with two repositories being created one called dms and the other dmsrm.  The dmsrm reposit

  • How to display a Column Header for the characteristic Text column

    Hi All Our users want me to provide for a column header for the characteristic text. Here is what I mean I am reporting 0plant in the rows as key and Text. In the column on Plant Key the column header says Plant but there is no column header for the

  • Occasional reboot when waking MacBook from sleep.  iTunes related?

    Recently, sometimes when I'm waking my MacBook from sleeping, instead of waking, it reboots. I'd say, one out of twenty times. It started around the same time I started subscribing to PodCasts. (I'm not using an iPod with them, just downloading them

  • Can't backup iPhoto library to external drive

    I've tried three times today to backup my iPhoto libray to an external hard drive.  The file is 22.2 GB in size. Using Firewire the transfer is supposed to take about 45 mninutes.  Each time at around :25-:30 it suddenly stops and I get an error mess

  • Adobe Cloud doesn´t start on windows start?

    Hello, the cloud doesn´t start anymore with windows. Settings are ok. Is there any service that must run? At the windows autostart config no entry about the cloud. Any idea? Thx for help best wishes