Column with for dynamic Columns

Hi,
In my report i have dynamic columns and i am achieving this using <?split-column-header:header?> , <?split-column-data:variable?>
I need to define with for the dynamically created columns.
How do i achieve this.
i have seen <?split-column-width:name?>,<?split-column-width:@width?> but didn't succeed.
I tried <?split-column-header:header?><?split-column-width:@200pt?><?heading?><?end split-column-data?>
Please advice.
Regards
Jeethi George

If you have BIP desktop client installed, please do refer the example in C:\Program Files\Oracle\BI Publisher\BI Publisher Desktop\samples\RTF templates\Advanced\Dynamic Columns
Also check the same described here http://download.oracle.com/docs/cd/E12844_01/doc/bip.1013/e12187/T421739T481157.htm#4535400

Similar Messages

  • How to display more than one column with for each

    Hi guys,
    how to display more than one column with for each like below?
    for each
    Item1
    Item2
    Item3
    Item4
    Item5
    Item6
    Item7
    Item8
    Item9
    Item10
    End for each
    for each          
    Item1     Item2     Item3
    Item4     Item5     Item6
    Item7     Item8     Item9
    Item10          
    End for each

    Take a look at this to see if the solution provided would work for you: https://blogs.oracle.com/xmlpublisher/entry/multi_column_row_woes
    Won't you have more than 10 records in your data file ? If you are going to have only 10 items then you may be able to use position() function to limit it to 3 each..
    Take a look at this: https://blogs.oracle.com/xmlpublisher/entry/turning_rows_into_columns
    Thanks,
    Bipuser

  • Dynamic columns: how can i add an adjacent column to each dynamic column?

    i would like to extend the dynamic columns example coming with XML Publisher MSWord plugin.
    the example produces a table like:
    TestScore 0-20 21-40 41-60 61-80 81-100
    Theology 20 37 50 12 122
    English 0 55 30 92 52
    Mathematics 30 45 50 102 22
    i would like to have an output like this:
    TestScore 0-20 21-40 41-60 61-80 81-100
    Theology     20 2,8% 37 5,1% 50 7,0% 12 1,7% 122 17,0%
    English     0 0,0% 55 7,6% 30 4,2% 92 12,8% 52 7,2%
    Mathematics 30 4,2% 45 6,3% 50 7,0% 102 14,2% 22 3,1%
    For each "original" value column i need an adjacent additional column with percentages
    one big header cell for the value- and adjacent percentage-column together.
    (the percentages can either be calculated in the template or they could be
    part of the XML. e.g. <PercOfStudents>2</PercOfStudents> as an additional child
    of the <TestScore> group.
    is this possible?
    how could i add an adjacent column to each dynamic column?
    any suggestions, tips or hints?
    Regards
    Peter

    Hi Peter
    Sorry, I was going to take a look at this this morning but got caught up in meetings. Glad you managed to work it out. I have a proposal for you, how about letting me post your solution to hte BIP blog? I can write it up and just use your examples ... full credit to you of course :o)
    Regards, Tim

  • Finding source database table/column name for a column in a view

    Hi i need to be able to identify the original database table/column name for a column in a view.
    e.g. say i have a view like this
    create v1 as select a.name fname, b.name bname, c.name cname,......
    from u1.names a, u2.names b. u3.names c
    where .....
    Now I want to find out that the database table/column name for the fname, bname and cname columns in the view v1, which in this instance is u1.name.name, u2.names.name, u3.names.name.
    But i need to be able to do it for any view. Short of parsing the SQL is there an easy way of doing this?
    Now obviusly I can't do this for virtual columns but I will know my column is not virtual as it has an index on it.

    But i need to be able to do it for any view. Short of
    parsing the SQL is there an easy way of doing this?No, parsing the SQL is the only way. Good luck it is not something I would want to attempt.

  • JTable - One Column Heading for Two Columns

    Can you adjust the default JTable to have one column heading for two columns of data? Is there a simple span command? I've looked at the api for JTable and JTableHeader and didn't see anything, is there something I'm missing? Any help would be appreciated.

    What i am trying to accomplish is have column 'E' span 2 columns.
    This is my code thus far, however it give the error from my pryor message. I am pretty sure it is because I'm using and Object[][] and a String[] instead of Vectors. What corrections do I need to make in order for my goal of:
    [ A ][ B ][ C ][ D ][ E  ][ F ][ G ]
    [ 1 ][ 2 ][ 3 ][ 4 ][5][6][ 7 ][ 8 ]
    Object[][] data = new Object[ROWS][COLUMNS];
    String[] columnNames = {"A","B","C","D","E","E","F","G"};
    table = new JTable(data, columnNames);
    table.setBackground(Color.white);
    table.addKeyListener(this);
    DefaultTableCellRenderer d = new DefaultTableCellRenderer();
    d.setHorizontalAlignment(JLabel.CENTER);
    table.setDefaultRenderer(table.getColumnClass(0),d);
    for (int i = 0; i < table.getColumnCount(); i++){
    TableColumn aColumn = header.getColumnModel().getColumn(i);
    TableCellRenderer renderer = aColumn.getHeaderRenderer();
    if (renderer == null) {
    renderer = new DefaultTableCellRenderer(){
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column){
    JTableHeader header = table.getTableHeader();
    if (header != null) {
    setForeground(header.getForeground());
    setBackground(header.getBackground());
    setFont(header.getFont());
    setHorizontalAlignment(JLabel.CENTER);
    setText((value == null) ? "" : value.toString());
    setBorder(UIManager.getBorder("TableHeader.cellBorder"));
    return this;
    aColumn.setHeaderRenderer(renderer);

  • Dynamic orderby clause for multiple columns with out Dynamic query

    Hi,
            I've a query like
    "select  * from tablename order by column1,column2,column3,column4,column5,column6"
    in the above query the order by column will be dynamically changed. The query is placed in a stored procedures and the order by column will come by parameter.
       For ex: @orderbycol = column2,column1,column3,column4,column5,column6
                                         or
                    @orderbycol = column3,column2,column1,column4,column5,coumn6
    How can we manage the order by clause as dynamically without go to dynamic query.

    ORDER BY CASE @sortcol1
                 WHEN 'col1' THEN col1
                 WHEN 'col2' THEN col2
             END,
             CASE @sortcol2
                 WHEN 'col1' THEN col1
                 WHEN 'col2' THEN col2
             END,
    Note: these CASE expressions assumes that all columns have the same data type.
    You could consider sorting in the presentation layer instead.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Cannot use alias for dynamic column name in SELECT statement

    Hi,
    I want to retrieve values from several tables by using dynamic column & table name as below:
    DATA: tbl_name(30) TYPE c VALUE '/bic/tbi_srcsys',  " staticly initialized for this example
               col_name(30) TYPE c VALUE '/bic/bi_srcsys'.  " staticly initialized for this example
    SELECT (col_name) INTO CORRESPONDING FIELDS OF TABLE it_values FROM (tbl_name).
    The internal table "it_values" does not contain a field named "/bic/bi_srcsys", instead it has another generic field "value" so that the above code can be applied to other tables. I tried to use alias (AS) as below:
    SELECT (col_name) AS value INTO CORRESPONDING FIELDS OF TABLE it_values FROM (tbl_name).
    But this cannot work. I know that there are other ways to solve this problem, such as by using a single field in SELECT .. ENDSELECT and subsequently appending it to the work area and internal table as below:
    SELECT (col_name)  INTO (lv_value) FROM (tbl_name).
      wa_value-value = lv_value.
      APPEND wa_value TO it_values.
    ENDSELECT.
    Just wonder if there is any other more elegant workaround, because I might have several other fields instead of only one?
    Thanks.
    Regards,
    Joon Meng

    Hi Suhas,
    thanks for the quick reply.
    Sorry that I have not well described the structure of the internal table "it_values". This internal table contains several other fields (key, type, value, etc.).
    I guess that the following code
    SELECT (col_name) INTO TABLE it_values FROM (tbl_name).
    works if the internal table only has one field (value) or the field "value" is in the first position, right?
    In this case, I need to fill the "value" field of internal table it_values (ignore the other fields like type, key) with values retrieved from (col_name) of the DDIC table.
    Looking forward to your reply.
    BR,
    Joon Meng

  • Column alias for spatial column within cursor loop using dynamic SQL

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

    The following PL/SQL is trying to generate an error report for records or objects which are 3 dimensional or above. I have no issue execute one statement in SQLPLUS but I need to use the column alias for the spatial column. But, it is a different story using PL/SQL and dynamic SQL Any help will be great because I've been working on this for than 8 hours but with no luck! Thanks.
    Here is the error I'm getting,
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    ERROR at line 15:
    ORA-06550: line 15, column 79:
    PLS-00103: Encountered the symbol "P" when expecting one of the following:
    . ( * @ % & = - + ; < / > at in is mod remainder not rem
    <an exponent (**)> <> or != or ~= >= <= <> and or like LIKE2_
    LIKE4_ LIKEC_ between || member SUBMULTISET_
    The symbol "* was inserted before "P" to continue.
    and my PL/SQL is,
    set serveroutput on size 100000 feedback off
    declare
    rs integer;
    rs1 integer;
    cur integer;
    rp integer;
    trs integer;
    n integer;
    un varchar2(30);
    stmt varchar2(200);
    begin
    dbms_output.put_line(rpad('Table Name',40)||' Dimension');
    dbms_output.put_line(rpad('-',53,'-'));
    cur:= dbms_sql.open_cursor;
    for t in (select column_name,table_name from user_sdo_geom_metadata where regexp_like(table_name, '[^[A-B]_[AB]$'))
    loop
    stmt := 'select p.column_name.get_gtype(), id from '|| table_name p ' where p.column_name.get_gtype() > 2 ';
    dbms_sql.parse(cur, stmt, dbms_sql.native);
    dbms_sql.define_column(cur, 1, rs);
    dbms_sql.define_column(cur, 2, rs1);
    rp:= dbms_sql.execute(cur);
    n:=dbms_sql.fetch_rows(cur);
    dbms_sql.column_value(cur, 1, rs);
    dbms_sql.column_value(cur, 2, rs1);
    dbms_output.put_line(rpad(t.table_name,38,'.')||rpad(rs,15)||rpad(rs1,15));
    end loop;
    dbms_sql.close_cursor(cur);
    dbms_output.put_line(rpad('-',53,'-'));
    end;
    set serveroutput off feedback on feedback 6

  • Translation for dynamic columns

    Hello,
    I am new to BIP and I am researching if it's possible to support translation for the a column splitting(crosstab) report that the column heading is not known until the runtime? Fortunately, I can seed the translation for these column headings in a TL table but I just would not know which columns will be displayed and the sequence of these display columns until the runtime.
    Thanks,
    Calvin

    Thank you very much for the reply but I am still a little unclear how to implement your suggested approaches.
    1) pass the correct translations to the report as part of the data set
    I intend to design 3 tables. Table 1 is the main one and Table 2 and 3 store the column headings and translation.
    Table 1: REPORT_ROWS(REPORT_NAME, ROWNUM, VALUE1, VALUE2, VALUE3...VALUE10).
    - REPORT_NAME + ROWNUM: PK columns
    - VALUE1-10: Depending on REPORT_NAME, different columns will be populated.
    Table 2: REPORT_FORMAT(REPORT_NAME, LABLE1, LABEL2,....LABEL10)
    Table 3: REPORT_FORMAT_TL(REPORT_NAME, LANGUAGE, LABEL1, LABEL2,....,LABEL10)
    I can get translations from Table3. But how do I get the labels displayed as column headings in the BIP?
    Isn't the column headings in BIP defaulted the table column name of Table 1?
    Should I change the design of these tables?
    2) and 3) how to do I pick the right translation at the runtime in the dataset or in the table?
    My understanding is the xliff file is based on strings on the report template. In this case, these strings are derived at the runtime.
    Therefore, the xliff file approach is not applicable. Is this a right assumption?
    Many thanks!
    Calvin

  • How to create a dynamic RTF report which creates dynamic columns based on dynamic column selection from a table?

    Hi All,
    Suppose I have table, whose structure changes frequently on daily basis.
    For eg. desc my_table gives you following column name on Day 1
    SQL > desc my_table;
    Output
    Name
    Age
    Phone
    On Day 2, two more columns are added, viz, Address and Salary.
    SQL > desc my_table;
    Output
    Name
    Age
    Phone
    Address
    Salary
    Now I want to create an Dynnamic RTF report which would fetch data from ALL columns from my_table on daily basis. For that I have defined a concurrent program with XML as output type and have attached a data template/data definition to it which takes in XML as input and gives final output of conc program in EXCEL layout. I am able to do this for constant number of columns, but dont know how to do it when the number of columns to be displayed changes dynamically.
    For Day 1 my XML file should be like this.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
    </group>
    </dataStructure>
    </dataTemplate>
    And my Day 1, EXCEL output from RTF template should be like this.
    Name     Age     Phone
    Swapnill     23     12345
    For Day 2 my XML file should be like this. With 2 new columns selected in SELECT clause.
    <?xml version="1.0" encoding="UTF-8"?>
    <dataTemplate name="XYZ" description="iExpenses Report" Version="1.0">
    <dataQuery>
    <sqlStatement name="Q2">
    <![CDATA[
    SELECT Name
    ,Age
    ,Phone
    ,Address
    ,Salary
    FROM my_table
    ]]>
    </sqlStatement>
    </dataQuery>
    <dataStructure>
    <group name="G_my_table" source="Q2">
      <element name="Name" value="Name" />
      <element name="Age" value="Age" />
      <element name="Phone" value="Phone" />
      <element name="Address" value="Address" />
      <element name="Salary" value="Salary" />
    </group>
    </dataStructure>
    </dataTemplate>
    And my Day 2, EXCEL output from RTF template should be like this.
    Name     Age     Phone     Address     Salary
    Swapnill     23     12345         Madrid     100000
    Now, I dont know below things.
    Make the XML dynamic as in on Day 1 there must be 3 columns in the SELECT statement and on Day 2, 5 columns. I want to create one dynamic XML which should not be required to be changed if new columns are added in my_table. I dont know how to create this query and also create their corresponding elements below.
    Make the RTF template dyanamic as in Day1 there must 3 columns in EXCEL output and on Day 2, 5 columns. I want to create a Dynamic RTF template which would show all the columns selected in Dynamic XML.I dont know how the RTF will create new XML tags and how it will know where to place it in the report. Means, I can create RTF template on Day 1, by loading XML data for 3 columns and placing 3 XML tags in template. But how will it create and place tags for new columns on Day 2?
    Hope, you got my requirement, its a challenging one. Please let me know how I can implement the required solution using RTF dynamically without any manual intervention.
    Regards,
    Swapnil K.
    Message was edited by: SwapnilK

    Hi All,
    I am able to fulfil above requirement. Now I am stuck at below point. Need your help!
    Is there any way to UPDATE the XML file attached to a Data Definition (XML Publisher > Data Definition) using a standard package or procedure call or may be an API from backend? I am creating an XML dynamically and I want to attach it to its Data Definition programmatically using SQL.
    Please let me know if there is any oracle functionality to do this.
    If not, please let me know the standard directories on application/database server where the XML files attached to Data Definitions are stored.
    For eg, /$APPL_TOP/ar/1.0/sql or something.
    Regards,
    Swapnil K.

  • Compare a varchar2 segment column with a date column

    Dear All ,
    i have a segment column with datatype varchar2 with data sample like '2013/06/09 00:00:00' , i want to compare this column with date column
    i tried many ways of conversion but not working like
    select to_date(TO_NCHAR(substr('2013/06/09 00:00:00',1,11),'DD-MM-YY'))DATE_C from dual ---> giving invalid number
    select TO_TIMESTAMP(TO_NCHAR(substr('2013/06/09 00:00:00',1,11),'DD-MM-YY'))DATE_C from dual ---> giving invalid number
    can i have any suggestion for that please
    thanks & best regards

    Hi,
    Have you tried:
    SELECT TO_DATE(SUBSTR('2013/06/09 00:00:00',1,10),'YYYY/MM/DD') DATE_C FROM dual
    Octavio

  • Web Dynpro ALV disable column sort for specific column

    Hi,
    I have the above mentioned problem. The Coding I use is:
    DATA:  lr_field_settings  TYPE REF TO if_salv_wd_field_settings,
                lt_fields          TYPE SALV_WD_T_FIELD_REF.
    FIELD-SYMBOLS:  <fs_field>  LIKE LINE OF lt_fields.
    lr_field_settings ?= lr_config.
    lt_fields = lr_field_settings->get_fields( ).
    READ TABLE lt_fields ASSIGNING <fs_field> WITH KEY fieldname = 'ANSPRECH_DETAILS'.
    IF sy-subrc EQ 0.
      <fs_field>-r_field->if_salv_wd_sort~set_sort_allowed( abap_false ).
      <fs_field>-r_field->if_salv_wd_sort~set_grouping_allowed( abap_false ).
    ENDIF.
    When debugging I can see that the object attributes for sort_allowed and grouping_allowed are changed from 'X' to ' '
    but the running application still allows sorting and grouping for the column 'ANSPRECH_DETAILS'.
    So what did I forget or what is my mistake ????
    Thx for your help.
    Dino Dini

    I got the similar requirement and I tried to do the below way.. it worked for me..
    DATA: lr_field_settings TYPE REF TO if_salv_wd_field_settings.
    DATA: lr_field TYPE REF TO cl_salv_wd_field.
    lr_field_settings ?= lr_table.
    lr_field = lr_field_settings->get_field( 'MATNR' ).
    lr_field->IF_SALV_WD_SORT~SET_SORT_ALLOWED( abap_false
    you can observe in the below image that sort option is not enabled for MATNR in the ALV.

  • Slider + activating column switches for a column chart

    Hi,
    I am trying to make an Xcelsius presentation and because I am a bit stuck I thought that may be you could point me to some solution.
    It is a three element column chart 
          + three status switches for every column chart column (if the switch is On, then the slider should affect (i.e. increase/decrease) the corresponding column, otherwise not)
          + a vertical slider which should increase/decrease only those of the columns for which the corresponding column switches are set On. If no column switch is On, then the slider should not affect any column value.
    As I see it, an intermediate subtraction value for every column should be calculated, depending on the corresponding column switch and cur slider value. And this value should be subtracted from the current slider value in order to receive the right current value for every column. I have tried with some formulas but with no success.
    Or may be a totally different approach should be taken?
    (By the way, is there some way that Excel store/memorize in the excel table the various intermediate values for the corresponding columns, so that they dont always depend on a formula, but after they are calculated they are stored for later processing?)
    As I have tried many variants with no success, I am beginning to doubt if this could at all be achieved with Excelsius.
    Do you think this kind of functionality could somehow be organized with Excelsius?
    Just in case I have put [here|
    inspire.wdf.sap.corp\INSPIRE_Share\Raptor_share\tmp\example_frames.zip] (
    inspire.wdf.sap.corp\INSPIRE_Share\Raptor_share\tmp\example_frames.zip) example frames, which demonstrate what the functionality should do.
    Thanks!
    Edited by: Kiril Bratanov on Oct 22, 2009 10:01 AM

    Lisa,
    Numbers will "wrap" text in a cell if you selec the cell(s) where you want to to wrap and check the box:
    If there is more, then please post a screen shot of what you doc currently looks like and what you want to change.
    Best Regards,
    Wayne

  • Different column height for each column

    I have problem with jTable.
    I have 4 columns in my jtable. height of two columns is same and
    height of two is doble the height of first two columns.
    I know that height can be set to entire row by setRowHeight()
    Could any one suggest solution for this.
    Thanks

    Thanks for your reply.
    But I don't want resize all the columns.
    For example two columns height 16 pixels, then rest of should be 32 pixels

  • HFR: How to calculate variation over last period for dynamic columns

    Hello Everyone,
                             How to calculate the period wise variation in a report where the period columns are dynamically generated from a range function? For example, the range function in the period column is &Current:Dec. What formula can I write in a calculated row so that the value is (Current  Period - Previous period)*100/Previous period ?
    Thanks,
    Sayantan

    You can add two more data rows.
    1. Use &Current
    2. Use relativemember function, select &Current, offset -1 (If you've a subvar for previous month that's the best)
    3. Add a formula row ([B]-[C]*100/[C])
    Regards
    Celvin
    http://www.orahyplabs.com

Maybe you are looking for

  • GR with Production Orders without reference to material

    Hi, Would just like to ask if it is possible to perform Goods Receipt to a Production Order without material reference (that is, created via CO07)? Whenever I create order via CO07, I cannot perform a 101 Goods Receipt. It seems in the Production Ord

  • Every time I try to open an image in Photoshop CS6 it freezes.

    I try to open images up in CS6 and it freezes. uninstalling program and then reinstalling it.. hopefully that helps.

  • Writing a file to an Oracle Directory

    Hello, I'd like to use a database trigger or PL/SQL to write a text file to to a directory on my database server. Is that possible? I know I could write a daemon that runs on the OS, but I'd lie to run it from the database itself.

  • XNET order of frames

    Hi, I have some problems with the XNET Write CAN Block. I use a loop for reading Data from CAN via XNET, doing some calculations and lateron sending those via XNET to CAN. I would like to send data at the end of every loop that is why I chose event i

  • CS4 installation

    Hi, I got question about ps cs4 installation. My sister bought me Photoshop cs4 as a present in UK when i was visiting her. Now i'm at home in Estonia and don't know would PS work after installation or not? I mean does it have regional blocking or ho