Dvt:PivotTable modify columns

I am using JDeveloper 11.1.2.1.0
I have made a dvt:PivotTable and it works fine, I can modify cell background color etc. There are two things that I haven't found a solution for.
1. How can I specify column width?
I have tried with CellFormat entered in dvt:pivotTable as DataFormat: (Left alignment works.)
  public CellFormat scheduleDataFormat(DataCellContext dataCellContext)
    CellFormat cf = new CellFormat(null,null,null);
    cf.setStyle("text-align:left; width:200px;");
    return cf;
  }and setting width using InlineStyle on the af:output component.
2. I can't rename the column header text. Tried with the following code, entered in dvt:pivotTable as HeaderFormat:
  public CellFormat scheduleHeaderFormat(HeaderCellContext headerCellContext)
    CellFormat cf = new CellFormat(null,"","");
    //Have also tried setting the width for the header
    cf.setStyle("text-align:left; width:250px;");
    Object[] dims = headerCellContext.getQDR().getDims().toArray();
    if (dims[dims.length - 1] instanceof String &&
    "Day".equalsIgnoreCase((String)dims[dims.length - 1])) {
      if("MO".equals(headerCellContext.getValue()))
        //This is printed to the console, but headerText is not changed
        System.out.println("Monday found");
        cf.setNewRawValue("Monday");
      if("WE".equals(headerCellContext.getValue()))
        //This is printed to the console, but headerText is not changed
        System.out.println("Wednesday found");
        cf.setNewRawValue("Wednesday");
    return cf;
  }Anyone got a solution for this?
Thanks in advance
Regards,
Thomas
Edited by: Thomas H on Apr 18, 2012 4:25 PM
I am starting to think that this isn't possible. Can't find a way to do this, help is appreciated.

I haven't tried to set the width of the cell yet. I don't think that the datacell component has a any attributes. You can set the overall size of the table.
Looks like we have the same problem regarding getting the headerText for columns. I have started this thread: Accessing header text in Pivot Table column
I have no problem fetching the headerText of rows, but I can't figure out how to fetch headerText of columns.. Is this even supported?

Similar Messages

  • Dvt:pivotTable question how to drill-down?

    Hello All,
    How can I implement drill down functionality in <dvt:pivotTable>
    with drillingEnabled=true
    I need to know, when these get called
    drillAction
    drillRequestingListener
    drillRequestedListener
    get called
    Thank you all

    Can anyone please help here, how to implement drilling functionality with pivotTable,
    <pivotTable IterBinding="InvoiceView1Iterator"
    id="InvoiceView11"
    xmlns="http://xmlns.oracle.com/adfm/dvt">
    <pivotTableDataMap>
    <columns>
    <data>
    <item value="EnteredAmt"/>
    <item value="RetAmt"/>
    <item value="RetTaxAmt"/>
    </data>
    </columns>
    <rows>
    <item value="CompCode"/>
    <item value="BName"/>
    </rows>
    </pivotTableDataMap>
    </pivotTable>
    also, its not accesible in backing bean,
    somebody please put some light on this dvt component
    Thank you

  • Finder Window - Date Modified Column Keeps Changing

    When I open a Finder window, change the size of the "Date Modified" column then close the Finder window, the next time I open the same Finder window, the "Date Modified" column will compress the size of the column.
    Why isn't Finder 10.9 maintaining my column changes?
    Any assitance or insight whould be appreciated.

    I solved the scrunched Date Modified column header in a similar fashion but added the Date Added field, which fixed the width of both Date columns.
    After doing so, I now find both Date-oriented columns display and read dynamically the actual date and time.
    I'm now looking for a solution to that issue, explained here:
    finder window date added date modified show date time always

  • Items "date modified" column when viewing files as list in finder

    I'm not really sure if I can change this viewing option, but i will give it a try:
    when viewing files as list in finder, "yesterday" items "date modified" column shows up with the term "yesterday", while this does not happen for "today" items, where what shows up is just today's date and not the term "today".
    I found this rather confusing, since it is not immediate: i.e. if I want to check for items modified today at a glance, i need to pick today's date from a ist with a number of different dates. As a matter of fact, it's a way easier when checking for yesterday's items.
    Suggestions anyone?
    Thanks!

    toygal wrote:
    I am new to Aperature and not very computer savvy so please provide "dummy's guide to" responses.
    toygal -- welcome to the Aperture user-to-user forum. iPhoto was designed with you in mind. Aperture is 100x more complicated (and no faster). I strongly recommend that you revert to iPhoto and use it. Compared to Aperture, it will bring you more pleasure and cause you much less frustration. Whoever told you that Aperture is faster not only was wrong, they failed to take into consideration the hours that you would have to practice to become comfortable with it.
    Here are some threads which briefly touch on the difference between iPhoto and Aperture -- use the search to find many more.
    http://discussions.apple.com/thread.jspa?messageID=13183439&#13183439
    http://discussions.apple.com/thread.jspa?messageID=12906017&#12906017
    http://discussions.apple.com/thread.jspa?messageID=12901779&#12901779
    Message was edited by: Kirby Krieger

  • Manage Table / Modify column does not display current values

    Hi,
    when I choose "Modify column" from the menu "Manage table", the current properties of the column, i.e. type, size and so on, are not shown, but are defaulted to whatever value has been defined inside that page, so the column type is always set to "Number" for instance.
    It would be definitely better to retain the current values, in my humble opinion.
    Bye,
    Flavio

    I have also run into this problem. I am running IQ 16.0 sp1. I wanted to increase the number of characters in one of the columns so I have to create a new column, copy the data, delete the old column then rename the new column.
    Is there any reason the MODIFY function is not implemented in IQ?

  • Setting column width on dvt:pivotTable

    Dear All,
    Jdeveloper 11.1.1.5.0
    adf bc
    I need to set the width of column in my pivotTable. But by default i think its adjusting according to its contents..
    any pointers ?
    Regards,

    Hello Santosh, could you finally solve the issue? I have the same problem. On the data side I set the Display Width (VO Attributes ->UI Hints) of the attribute to something like 20, but still the column at run time is displayed to the size of the data column (300).
    Any hint will really be appreciated.
    jleon

  • Can't modify column?

    Hi,
    I need to alter the data type of a date column to varchar2(6).
    Here's the tabel I need to change.
    SQL> desc foo
    Name Null? Type
    PK NUMBER
    DOB DATE
    I understand that I must NULL out the DOB column before I can do the ...
    alter table foo modify (DOB varchar2(6));
    ... so I create another table like so ...
    SQL> create table foo2 as select * from foo;
    Table created.
    ... now I can do ...
    SQL> update foo set DOB = NULL;
    100 rows updated.
    SQL> commit;
    Commit complete.
    ... now I do ...
    SQL> alter table foo modify ( dob varchar2(6));
    alter table foo modify ( dob varchar2(6))
    ERROR at line 1:
    ORA-01401: inserted value too large for column
    Why do I get this error?
    thanks

    Depending too regarding the nls_date_format in your system, the result when you query the date will be higher o viceversa.
    As you realized try with varchar2(8), if it fails try
    to increase that number.
    Joel P�rez

  • Ora-01440 on modifying column - urgent needed

    Hi
    we have following table
    SQL> desc VULNERABILITY_REG_PERIODS
    Name Null? Type
    CLIENT_ID NOT NULL NUMBER(10)
    ASSOCIATED_FAMILY NUMBER(7)
    HCP VARCHAR2(8)
    STAFF_TYPE VARCHAR2(2)
    DATE_ON_PROTECTION NOT NULL DATE
    DATE_OFF_PROTECTION NOT NULL DATE
    SECTOR VARCHAR2(2)
    AUDIT_TIMESTAMP DATE
    AUDIT_ID NUMBER
    AUDIT_ORIGIN VARCHAR2(30)
    RECORD_STATUS CHAR(1)
    i am trying to modify the column
    alter table VULNERABILITY_REG_PERIODS modify audit_id number(10,0);
    the max length of audit_id is 4
    SQL> select max(audit_id) from VULNERABILITY_REG_PERIODS;
    MAX(AUDIT_ID)
    9936
    what is the reason for above error when modifyng this column
    thanx
    kedar

    Hi,
    I think that internally, Oracle understand that NUMBER is a synonym for NUMBER(38).
    The precision can range from 1 to 38. Then, that's why this error is happening;
    You can try this below:
    SGMS@ORACLE10> create table x (cod number);
    Table created.
    SGMS@ORACLE10> insert into x values (1000);
    1 row created.
    SGMS@ORACLE10> commit;
    Commit complete.
    SGMS@ORACLE10> desc x
    Name                  Null?    Type
    COD                            NUMBER
    SGMS@ORACLE10> alter table x add (temp number);
    Table altered.
    SGMS@ORACLE10> update x set temp = cod;
    1 row updated.
    SGMS@ORACLE10> update x set cod = null;
    1 row updated.
    SGMS@ORACLE10> alter table x modify cod number (10,0);
    Table altered.
    SGMS@ORACLE10> update x set cod = temp;
    1 row updated.
    SGMS@ORACLE10> alter table x drop column temp;
    Table altered.
    SGMS@ORACLE10> desc x
    Name Null? Type
    COD NUMBER(10)
    SGMS@ORACLE10>Cheers

  • Modify column in an internal table

    Hi Friends,
    I have an internal table itab1 which has a column called zpo_number .
    I am getting the PO from a BAPI call storing in a field w_ponumber.
    I have the code below . THe table itab1 has rows all having the same matnr .
    How can I modify all the rows of the table with the same w_ponumber ?
    Thanks!
    Loop at itab1
    babpi call get po number
    w_ponumber.
    MODIFY itab1
    endloop.

    simplicity change to your original code provided:
    Loop at itab1
    babpi call get po number
    w_ponumber.
    itab1-z_ponumber  = w_ponumber.
    MODIFY itab1
    endloop.
    Or -
    Loop at itab1
    babpi call get po number
    itab1-z_ponumber.
    MODIFY itab1
    endloop.

  • Urgent!!! Modify column of a table having records

    Dear all,
    I have a table with a column VARCHAR2(12) and I need to modify this column into VARCHAR2(9) without losing any data! s there any workaround?
    Thanx a lot!!

    This code was posted in one of the previous Oracle magazines:
    The Pl/Sql procedure to rename the column must be compiled in to the database you require to rename columns in - one note I would run this as SYS:
    create or replace procedure RenameColumn
    (pUserName varchar2,
    pTableName varchar2,
    pOldColumnName varchar2,
    pNewColumnName varchar2
    is
    vUserName dba_users.userName%type :=
    upper(ltrim(rtrim(pUserName)));
    vTableName dba_tables.table_name%type :=
    upper(ltrim(rtrim(pTableName)));
    vOldColumnName dba_tab_columns.column_name%type :=
    upper(ltrim(rtrim(pOldColumnName)));
    vNewColumnName dba_tab_columns.column_name%type :=
    upper(ltrim(rtrim(pNewColumnName)));
    vErrorMessage varchar2(4000);
    eNotAuthorizedUser exception; /* -20101 */
    eInvalidUser exception; /* -20102 */
    eInvalidTable exception; /* -20103 */
    eInvalidOldColumn exception; /* -20104 */
    eInvalidNewColumn exception; /* -20105 */
    cursor csrCheckUser
    (pUser dba_users.userName%type)
    is
    select '1'
    from dba_users
    where userName = pUser;
    cursor csrCheckTable
    (pUser dba_tables.owner%type,
    pTable dba_tables.table_name%type)
    is
    select '1'
    from dba_tables
    where owner = pUser
    and table_name = pTable;
    cursor csrCheckExistingColumn
    (pUser dba_tables.owner%type,
    pTable dba_tables.table_name%type,
    pColumn dba_tab_columns.column_name%type)
    is
    select '1'
    from dba_tab_columns
    where owner = pUser
    and table_name = pTable
    and column_name = pColumn;
    vDummy char(1);
    begin
    if user <> 'SYS'
    then
    raise eNotAuthorizedUser;
    end if;
    /* Check the value of vUserName */
    if vUserName is null
    then
    raise eInvalidUser;
    end if;
    open csrCheckUser(vUserName);
    fetch csrCheckUser into vDummy;
    if csrCheckUser%notfound
    then
    close csrCheckUser;
    raise eInvalidUser;
    end if;
    close csrCheckUser;
    /* Check the value of vTableName */
    if vTableName is null
    then
    raise eInvalidTable;
    end if;
    open csrCheckTable(vUserName, vTableName);
    fetch csrCheckTable into vDummy;
    if csrCheckTable%notfound
    then
    close csrCheckTable;
    raise eInvalidTable;
    end if;
    close csrCheckTable;
    /* Check the value of vOldColumnName */
    if vOldColumnName is null
    then
    raise eInvalidOldColumn;
    end if;
    open csrCheckExistingColumn(vUserName, vTableName, vOldColumnName);
    fetch csrCheckExistingColumn into vDummy;
    if csrCheckExistingColumn%notfound
    then
    close csrCheckExistingColumn;
    raise eInvalidOldColumn;
    end if;
    close csrCheckExistingColumn;
    /* Check the value of vNewColumnName */
    if vNewColumnName is null
    then
    raise eInvalidNewColumn;
    end if;
    open csrCheckExistingColumn(vUserName, vTableName, vNewColumnName);
    fetch csrCheckExistingColumn into vDummy;
    if csrCheckExistingColumn%found
    then
    close csrCheckExistingColumn;
    raise eInvalidNewColumn;
    end if;
    close csrCheckExistingColumn;
    /* Update the row in col$ Oracle dictionary */
    update col$
    set name = vNewColumnName
    where (obj#, col#) in
    (select obj#,
    col#
    from col$
    where name = vOldColumnName
    and obj# = (select obj#
    from obj$
    where name = vTableName
    and owner# = (select user_id
    from dba_users
    where username = vUserName)));
    commit;
    exception
    when eNotAuthorizedUser
    then
    vErrorMessage := 'User ' || user ||
    ' is not authorized to run this procedure.';
    raise_application_error(-20101, vErrorMessage);
    when eInvalidUser
    then
    vErrorMessage := 'Invalid user name: ' ||
    pUserName || '.';
    raise_application_error(-20102, vErrorMessage);
    when eInvalidTable
    then
    vErrorMessage := 'Invalid table name: ' ||
    pTableName || '.';
    raise_application_error(-20103, vErrorMessage);
    when eInvalidOldColumn
    then
    vErrorMessage := 'Invalid old column name: ' ||
    pOldColumnName || '.';
    raise_application_error(-20104, vErrorMessage);
    when eInvalidNewColumn
    then
    vErrorMessage := 'Invalid new column name: ' ||
    pNewColumnName || '.';
    raise_application_error(-20105, vErrorMessage);
    end RenameColumn;
    Once you have the above in and compiled okay then you can rename you column names by:
    begin
    RenameColumn('SCOTT', 'EMPTEST', 'SAL', 'SALARY');
    end;
    also while still connected as SYS, note the parameters SCOTT should be the schema owner which contains the table, EMPTEST is the table name which contains the column, SAL is the old column name and SALARY is the new column name.
    Have fun.

  • Modify columns in list view - add annotations

    Hello! Does anyone know if we can add new columns to the list view of assets in the production window? My goal is to have a column that shows annotation information in the list view. Possible?
    Thanks!

    Yes, kind of. You can add (and subtract) columns to a list view by modifying the List (ASSETLISTVIEW) metadata group. You can add Annotations but I'm not sure what you'll see for a value given it is not a unicode value field. It might not be a ver useful field to have in list view.

  • ORA-30036 when modifying column in large table

    Oracle version 10.2.0.4
    Afternoon everyone!
    I have a large table that I need to modify a column in - increasing from CHAR(3) to CHAR(6)
    On altering the table I'm getting an ORA-30036: unable to extend segment but 8 in undo tablespace
    Increasing undo tbs size isn't really an option, and I don't really want to go copying the table elsewhere either - again due to space limitations.
    Is there a way to avoid this undo exhaustion? Will disabling logging for this table solve my issue? Or is there another way similar to the 'checkpoint' clause you can use when dropping columns?
    Many thanks!
    Adam M

    Just in case nothing better appears and you can't increase the UNDO ...
    1. Create a new table with the correct datatype
    2. Insert data from the old table to the new table, in batches if necessary. Divide the data by key values if possible or get a range of rowids to process or something
    3. Make sure dependent objects are created for the new table
    4. drop the old table
    5. rename the old table to the new table

  • Modifying column properties in Derby DB problem

    ALTER TABLE photo MODIFY BYTES MEDIUMBLOB NOT NULL;
    This works in MySql for changing "bytes" column of table photo from a blob to medium blob, but doesnt work for Derby.
    Someone has a clue ?
    Derby docs state that column type cannot change, but I dont think this is necessary "feature". Is there some kind of workaround ? Or even Is the last statement true ?

    I recalled another solution:
    Drop the column and recreate it but:
    ALTER TABLE PHOTO DROP COLUMN BYTES;gives
    Error code -1, SQL state 42X01: Syntax error: Encountered "DROP" at line 1, column 29.Any thoughts ?
    Anyway how should I use your sequence ?
    Any query for this ?
    Query because I am using this as a workaround for certain limitations, during dev-time.
    Thanks

  • Modifying column adding primary key constraint

    how can we alter a table and modify a column and add a primary key constraint to it??

    987018 wrote:
    can't we add a primary key constraint using the modify command?If the column already exists, and ther is no existing primary key, then
    SQL> create table t (id number, descr varchar2(10));
    Table created.
    SQL> alter table t modify (id not null primary key);
    Table altered.If the column does not yet exist and ther is no primary key then:
    SQL> create table t1 (descr varchar2(10));
    Table created.
    SQL> alter table t1 add (id number not null primary key);
    Table altered.John

  • Modify columns in partition

    Dear all,
    CREATE INDEX CMLS.SUPRT_N1 ON CMLS.SUPERT
    (LNO, C_DATE, TDATE, TRF_GP, CNO,
    CTYPE, CTYPE)
    TABLESPACE CMDK01
    INITRANS 2
    MAXTRANS 255
    NOLOGGING
    LOCAL (
    PARTITION DEC200801
    LOGGING
    NOCOMPRESS
    TABLESPACE CMDK01
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 6M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    BUFFER_POOL DEFAULT
    I want to modify the index to remove the column c_date and look like
    CREATE INDEX CMLS.SUPRT_N1 ON CMLS.SUPERT
    (LNO, C_DATE, TDATE, TRF_GP, CNO,
    CTYPE, CTYPE)
    TABLESPACE CMDK01
    INITRANS 2
    MAXTRANS 255
    NOLOGGING
    LOCAL (
    PARTITION DEC200801
    LOGGING
    NOCOMPRESS
    TABLESPACE CMDK01
    PCTFREE 10
    INITRANS 2
    MAXTRANS 255
    STORAGE (
    INITIAL 6M
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    BUFFER_POOL DEFAULT
    Do I have to drop the index and recreate it? or shall I modify it ?. if so, can anyone let me know the command used ?
    Kai

    You forgot to remove C_DATE in you second example ;-)
    And someonelse answered your question already
    Edited by: hoek on Apr 6, 2009 2:45 PM

Maybe you are looking for

  • NW2004s: Homogeneous systemcopy ABAP + JAVA

    When doing a combined ABAP + Java systemcopy via R3load procedure, the "old" configurations in the propertysheets on the filesystem may get lost. What is the general procedure here to find out, what needs to be manually adapted after a systemcopy? I

  • Installation of a new language after BI CONTENT activation

    Dear Experts, we have a BW 7.01 installed with defaults languages (DE, EN), we have also as source system  a R/3 4.7 Ext.200 with other languages installed like IT. All customizing data in source system are written in IT language, with a  client logg

  • Could not load file or assembly 'Oracle.DataAccess' Windows Vista x64

    Ok now here is the funny part, this works fine when i'm developing ASP.NET applications ( i assume that is puts the dev web server into x86 mode), but when im trying to use Oracle.DataAccess DLL in a console application i get a '+Additional informati

  • Unable to open CR2 files elements 10

    I know this problem has been disscussed on multiple occassions but i am completely baffled. Recently elements has been unable to open any new CR2 files saying they are the wrong file type. The reason i am baffled is when i bought the software (month

  • Adding Vendors in 7.4

    When I add a vendor to the vendors page, it adds them twice. Is this a bug or working as designed? This topic first appeared in the Spiceworks Community