Conditional Formating of rows and columns in template(cross tab)

Hi,
I am developing a cross tab report in which I have row header as the year like 2008,2007,2006....column header as months jan,feb,mar...and the data area contains the respective data...I need to format the background color of the rows and columns which are below the date of the report(report is ran for a particular month like mar-08)..I was able to format the background color of all the rows that fall below(ex:08) the year of the report(using <?if@row:row_name<'$first'?> <xsl::attribute name="background-color" xdofo:ctx="incontext">#C0D27F</xsl::attribute><?end if?>)..
and I need to format the 3(till march) columns in the yr 2008
Thanks...

Hello..
Thanks for the reply...
I have report date as mm|yyyy...below is a sample data of the cross tab..
<Q1>
<REPORT_DATE>04|2005</REPORT_DATE>
</Q1>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>1.32</NET_ROR>
<ACTUAL_DATE>01/01/2004</ACTUAL_DATE>
<FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>JAN</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>-.21</NET_ROR>
<ACTUAL_DATE>01/01/2005</ACTUAL_DATE>
<FUND_FACT_YTD>5.739540457478967975310388578877768035</FUND_FACT_YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>.59</NET_ROR>
<ACTUAL_DATE>02/01/2004</ACTUAL_DATE>
<YTD>7.942192987387475647074276803933198866</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>FEB</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>1</NET_ROR>
<ACTUAL_DATE>02/01/2005</ACTUAL_DATE>
<YTD>5.739540457478967975310388578877768035</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>0</NET_ROR>
<ACTUAL_DATE>03/01/2004</ACTUAL_DATE>
<YTD>7.942192987387475647074276803933198866</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>MAR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>-.2</NET_ROR>
<ACTUAL_DATE>03/01/2005</ACTUAL_DATE>
<YTD>5.739540457478967975310388578877768035</YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2004</BEGIN_DATE>
<NET_ROR>-.07</NET_ROR>
<ACTUAL_DATE>04/01/2004</ACTUAL_DATE>
<FUND_FACT_YTD>7.942192987387475647074276803933198866</FUND_FACT_YTD>
</Q4>
<Q4>
<CLASS_ID>1</CLASS_ID>
<MONTH_BEGIN_DATE>APR</MONTH_BEGIN_DATE>
<BEGIN_DATE>2005</BEGIN_DATE>
<NET_ROR>-.87</NET_ROR>
<ACTUAL_DATE>04/01/2005</ACTUAL_DATE>
<YTD>5.739540457478967975310388578877768035</YTD>
</Q4>
MONTH_BEGIN_DATE goes as the column header, BEGIN_DATE goes as the row header and NET_ROR is the data area..I need to get the background color of each cell of NET_ROR below the report date as one color...
Thanks ..

Similar Messages

  • Row and column heading in cross tab report

    Hi Gurus,
    Is it possible to leave column headings and row headings in a crosstab report blank?
    Pooja

    Hi,
    You could either suppress the Column Headings by unchecking
    Tools-->Options-->Column Heading or Making the background color and the font color of the cell to be same ( gray ), thereby making it invisible, though it is actually there.

  • Data format in rows and columns

    I have a table and have the following data,I need to transpose int he required form.
    The number of rows are dynamic and i dont want decode and string concatenation.
    1     Tamil     1     1000
    2     English     2     2000
    3     Hindi     3     3000
    4     German     4     4000
    5     Telugu     5     5000
    o/p
    tamil english hindi german telegu
    1 2 3 4 5
    1000 2000 3000 4000 5000
    The first column values will become the heading and all other corresponsing rows will become the column values
    Kindly reply ,,Thaks in advance

    how about this
    assuming you've implemented the stragg function (see ask tom if not)
    of course you can always use sys connect by path to roll the column values up into a single entry.
    anyway use stragg or sys connect by path to get all the colum values into a single entry seperated by commas
    col1 col2 col3
    Tamil,English,Hindi,German,Telugu 1,2,3,4,5 1000,2000,3000,4000,5000
    next I used the model clause to take the three columns one row construct
    and change it to one column 3 rows so now the result set looks like this
    col1
    Tamil,English,Hindi,German,Telugu
    1,2,3,4,5
    1000,2000,3000,4000,5000
    finally I appended a comma to the end of each row and parsed through it pulling out the text between columns
    here is the whole thing...... again for this to work you need to have implemented the stragg function else you'll have to change to sys connect by path.
    select col4 StraggedValues,
    substr (col4, 1, instr(col4,',',1) -1) col1,
    substr (col4, instr(col4,',',1)+1, instr(col4,',',1,2) - instr(col4,',',1)-1) col2,
    substr (col4, instr(col4,',',1,2)+1, instr(col4,',',1,3) - instr(col4,',',1,2)-1) col3,
    substr (col4, instr(col4,',',1,3)+1, instr(col4,',',1,4) - instr(col4,',',1,3)-1) col4,
    substr (col4, instr(col4,',',1,4)+1, instr(col4,',',1,5) - instr(col4,',',1,4)-1) col5,
    substr (col4, instr(col4,',',1,5)+1, instr(col4,',',1,6) - instr(col4,',',1,5)-1) col6,
    substr (col4, instr(col4,',',1,6)+1, instr(col4,',',1,7) - instr(col4,',',1,6)-1) col7
    from (
    with a as
    select stragg(col1) strCol1, stragg(col2) strCol2, stragg(col3) strCol3 from
    select 1 rn, 'Tamil' col1, 1 col2, 1000 col3 from dual union
    select 2 rn, 'English' col1, 2 col2, 2000 col3 from dual union
    select 3 rn, 'Hindi' col1, 3 col2, 3000 col3 from dual union
    select 4 rn, 'German' col1, 4 col2, 4000 col3 from dual union
    select 5 rn, 'Telugu' col1, 5 col2, 5000 col3 from dual
    select col4||',' col4 from a
    model
    return updated rows
    dimension by (0 d)
    measures (strcol1, strcol2, strcol3, 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx' col4)
    rules iterate (3)
    col4[iteration_number + 1] = case iteration_number
    when 0 then strcol1[0]
    when 1 then strcol2[0]
    when 2 then strcol3[0]
    else null end
    )) b

  • Row and Column Template ?

    Trying to create this thing but no matter what I do I keep getting this ridiculous error:
    Cannot create a linked row and column template based on
    the selected rows. The grid needs to have at least one data row that is
    not part of a row and column template.
    What does this mean?

    You can get your requirement done using the Row and Column Template
    You can not save a row and column template with all rows in a report. You have to exclude at least one data row, otherwise you
    will get the error that you mentioned.
    If you want to save all the rows as a template and re-use it in other report, you can insert a data row at the end of all rows and hide that.
    Now you can select the complete row set as a template by excluding the extra data row that you will insert & hide.
    If you want to link the template in other reports with same row set you must be very careful with the formatting as you need to apply
    inherit formatting before saving the template. I suggest to spend some time with the FR online documentation.
    Regards
    Ram

  • 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.

  • Report Writer Row and Column Format

    Hi
    Was wondering if there is a possible solution to this :-
    Understand that column format is controlled by format groups. This means that all figures in the same column will take the same format (such as scaling and decimal place).
    Scenario is ->
                        Colunn #1 -> column set as displaying no decimal point       
    Rev                  120
    OP                      5
    OP margin %     4.2 -> how to set this to 1 decimal point. Any formula syntax that I can use?
    Regards.

    Hi Vinay,
    Based on my research, freezing row and column headers are different in table and matrix.
    In a table, if we want to freeze column header, we should make the changes in the first Static row group in Row Groups pane with Advanced Mode as you said. If we want to freeze row header, the table should have a group ahead, then we can enable “Repeat header
    rows on each page” and “Keep header visible while scrolling” options in Row Headers in Tablix Properties dialog box.
    In a matrix, if we want to freeze column header, we can enable “Repeat header columns on each page” and “Keep header visible while scrolling” options in Column Headers in Tablix Properties dialog box. If we want to freeze row header, we can enable “Repeat
    header rows on each page” and “Keep header visible while scrolling” options in Row Headers in Tablix Properties dialog box.
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • 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.

  • How can I make Numbers respect the row and column locks in an Excel workbook opened in Numbers???

    I have a Windows server app that generates Excel workbooks to be emailed to political campaign volunteers to be loaded into Numbers on an iPad, edited, then emailed back to be posted to the server database.  There are two problems encountered:
    1.  The Excel workbook has the first row (column headings) and first column (route identifier) of cells locked, so that they will not scroll off the screen, but Numbers doesn't respect the locks, so when the user scrolls horizontally or vertically, the column headings and/or the route identifier scroll off the screen.
    2.  The Excel workbook has pop-up "tool-tip" type comments in certain column headings in order to provide the user with the acceptable entries for those columns, but Numbers does not respect those.  When the user touches any of the commented column heading cells, a context menu appears instead of the comment.
    What must I do in the Excel workbook sheets, or what settings can be made in Numbers to correct the above?

    I imported a Numbers '09 file into Numbers on the iPad.  All comments were removed during import. Frozen header row and column were retained.
    Thank you for your responses I must ask, however, when you refer to "importing" the Excel file, are you referring to a two step process whereby the Excel file is first converted by some other process into Numbers format, then opened in the Numbers application - which is what I have to do in my PC application to generate the Excel file, and reverse that process to convert the Excel back into my database format - or are you simply referring to opening the file in Numbers as "importing" it?  And please excuse any ignorance, as I'm not at all familiar with Apple's terminologies.  In fact, I don't own an iPad myself, but rather I have to depend on one of my clients to do the testing for me.
    I imported an XLSX file into Numbers on the iPad.  The file used "freeze panes" to "freeze" the first column and row. Only warning on import was that it changed fonts. It imported without the first row and column frozen and with no comments. Nothing I can do about the missing comments but it was a simple matter to turn the first column & row into headers and freeze them.
    Unfortunately this would not be an efficient  solution, since the end users are, for the most part, elderly political campaign volunteers who are fairly computer illiterate.  These workbooks are actually canvassing lists - known as walklists.  Their purpose is for the volunteers to interview voters, record the results of the interviews, and post the results to a database, which provides the campaigns with valuable strategizing capabilities.  Also, these workbooks have multiple pages - as many as 10 or more.  and from what I infer from the above, the setting changes would have to be made on each page.
    My whole intent in developing this iPad/Tablet methodology was to significantly reduce volunteer's work - which is a recruitment benefit - and eliminate paper.  While the latter would be accomplished, the former would not, and in fact would tend to increase it.  It's necessary to keep the first row - column headings - and the first column - the route identifier - from scrolling off the page, so that the volunteer won't have to keep scrolling up and down and right and left to know what the data are.
    Conclusion: Comments are not supported on the iPad version of Numbers.  Frozen headers are not imported from Excel but can be recreated easily.
    I was previously directed to the Apple website  http://www.apple.com/ipad/from-the-app-store/apps-by-apple/numbers.html which extols the wonders of the Numbers application.  About halfway down the page there's a section regarding, "Sliders steppers and pop-ups".  The web page states that pop-ups can be set up but, being a marketing site, gives no indication whatsoever as to how it's done.  I was hoping someone could tell my if there's any way to carry them over from an Excel file.

  • JTable fixed Row and Column in the same window

    Hi
    Could anyone tip me how to make fixed row and column in the same table(s).
    I know how to make column fixed and row, tried to combine them but it didnt look pretty.
    Can anyone give me a tip?
    Thanks! :)

    Got it to work!
    heres the kod.. nothing beautiful, didnt clean it up.
    * NewClass.java
    * Created on den 29 november 2007, 12:51
    * To change this template, choose Tools | Template Manager
    * and open the template in the editor.
    package tablevectortest;
    * @author Sockan
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    public class FixedRowCol extends JFrame {
      Object[][] data;
      Object[] column;
      JTable fixedTable,table,fixedColTable,fixedTopmodelTable;
      private int FIXED_NUM = 16;
      public FixedRowCol() {
        super( "Fixed Row Example" );
        data =  new Object[][]{
            {      "","A","A","A","",""},
            {      "a","b","","","",""},
            {      "a","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","","","","","f"},
            {      "","b","","","",""},
            {      "","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","b","","","",""},
            {      "","","c","","",""},
            {      "","","","d","",""},
            {      "","","","","e",""},
            {      "","","","","","f"},
            {      "I","","W","G","A",""}};
        column = new Object[]{"A","B","C","D","E","F"};
        AbstractTableModel fixedColModel = new AbstractTableModel() {
          public int getColumnCount() {
            return 1;
          public int getRowCount() {
            return data.length;
          public String getColumnName(int col) {
            return (String) column[col];
          public Object getValueAt(int row, int col) {
            return data[row][col];
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel    model = new AbstractTableModel() {
          public int getColumnCount() { return column.length-2; }
          public int getRowCount() { return data.length - FIXED_NUM; }
          public String getColumnName(int col) {
           return (String)column[col+1];
          public Object getValueAt(int row, int col) {
            return data[row][col+1];
          public void setValueAt(Object obj, int row, int col) {
            data[row][col+1] = obj;
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel fixedTopModel = new AbstractTableModel() {
          public int getColumnCount() { return 1; }
          public int getRowCount() { return data.length - FIXED_NUM; }
          public String getColumnName(int col) {
           return (String)column[col];
          public Object getValueAt(int row, int col) {
            return data[row][col];
          public void setValueAt(Object obj, int row, int col) {
            data[row][col] = obj;
          public boolean CellEditable(int row, int col) {
            return true;
        AbstractTableModel fixedModel = new AbstractTableModel() {     
          public int getColumnCount() { return column.length-2; }
          public int getRowCount() { return FIXED_NUM; }
          public Object getValueAt(int row, int col) {
            return data[row + (data.length - FIXED_NUM)][col+1];
        table = new JTable( model );
        table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fixedTable = new JTable( fixedModel );
        fixedTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fixedColTable= new JTable(fixedColModel);
        fixedColTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedColTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        fixedTopmodelTable = new JTable(fixedTopModel);
        fixedTopmodelTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
        fixedTopmodelTable.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);   
        JScrollPane scroll      = new JScrollPane( table );
         scroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
         scroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        JScrollPane fixedScroll = new JScrollPane( fixedTable ) {
          public void setColumnHeaderView(Component view) {}
        fixedScroll.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
        fixedScroll.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
        JScrollBar bar = scroll.getVerticalScrollBar();
        JScrollBar dummyBar = new JScrollBar() {
          public void paint(Graphics g) {}
        dummyBar.setPreferredSize(bar.getPreferredSize());
        scroll.setVerticalScrollBar(dummyBar);
        final JScrollBar bar1 = scroll.getHorizontalScrollBar();
        JScrollBar bar2 = fixedScroll.getHorizontalScrollBar();
        bar2.addAdjustmentListener(new AdjustmentListener() {
          public void adjustmentValueChanged(AdjustmentEvent e) {
            bar1.setValue(e.getValue());
        JViewport viewport = new JViewport();
        viewport.setView(fixedColTable);
        viewport.setPreferredSize(fixedColTable.getPreferredSize());
        fixedScroll.setRowHeaderView(viewport);
        fixedScroll.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixedColTable
            .getTableHeader());   
        JViewport viewport2 = new JViewport();
        viewport2.setView(fixedTopmodelTable);
        viewport2.setPreferredSize(fixedTopmodelTable.getPreferredSize());
        scroll.setRowHeaderView(viewport2);
        scroll.setCorner(JScrollPane.UPPER_LEFT_CORNER, fixedTopmodelTable
            .getTableHeader()); 
        scroll.setPreferredSize(new Dimension(600, 19));
        fixedScroll.setPreferredSize(new Dimension(600, 100)); 
        getContentPane().add(     scroll, BorderLayout.NORTH);
        getContentPane().add(fixedScroll, BorderLayout.CENTER);   
      public static void main(String[] args) {
        FixedRowCol frame = new FixedRowCol();
        frame.addWindowListener( new WindowAdapter() {
          public void windowClosing( WindowEvent e ) {
            System.exit(0);
        frame.pack();
        frame.setVisible(true);
    }

  • Report with multiple dimensions in Row and Column with EvEXP

    Hi
    We are currently running BPC 7.0 SP3 and try to create the report(or schedule) with more 2 x 2 dimensions in the row and column.
    e.g.
    row dimension : Outer row is Entity, Inner row is Account
    column dimension : Outer column is Time, Inner row is Category
    We created the report with  2 x 2 dimensions like above e.g. with EvEXP and EvNXP, NOT EvDRE
    based on default dynamic template:Template13.xlt(Nested Row, 2 x 1 dimensions defined by EvEXP and EvNXP formula).
    However, when expanding the dimension with double click these dimensions or change CV of the report with  2 x 2 dimensions defined by EvEXP and EvNXP formula,
    error occurs on EvEXP and EvNXP formula and can't retrieve the result correctly.
    [Question]
    Can't we create the report with more 2 x 2 dimensions in the row and column using EvEXP and EvNXP function ?
    We understand that we can make the report with more 2 x 2 dimensions in the row and column if using EvDRE.
    Thank You in advance
    Kenya

    Thank you for your advice.
    I understand that we should use EvDRE when creating the report with multiple dimension in the row/column because EvEXP have some erros, poor performance, etc.
    Then, we have two questions.
    1)
    >plus they had some errors in the designs.
    what kind of errors they have as an example?
    2)
    >If you must build the EVEXP and EVNXP, I would suggest building the template from scratch
    We built the simple template with just 2 x 2 dimension from scratch.
    But this report doesn't work well when double-click the dimension or changing CV...
    Would you please check the following template?
    <https://sapmats-de.sap-ag.de/download/download.cgi?id=RCZE1ME4YSORY3DCDO4NNMANZLBL1L5ZBUOB2F71YVNVS8XDJW>
    It would be greatly appreciated if you could give me your advice for the template.
    Thank you again
    And my best regards,
    Kenya

  • How to create table with rows and columns in the layout mode?

    One of my friends advised me to develop my whole site on the
    layout mode as its better than the standard as he says
    but I couldnot make an ordinary table with rows and columns
    in th layout mode
    is there any one who can tell me how to?
    thanx alot

    Your friend is obviously not a reliable source of HTML
    information.
    Murray --- ICQ 71997575
    Adobe Community Expert
    (If you *MUST* email me, don't LAUGH when you do so!)
    ==================
    http://www.dreamweavermx-templates.com
    - Template Triage!
    http://www.projectseven.com/go
    - DW FAQs, Tutorials & Resources
    http://www.dwfaq.com - DW FAQs,
    Tutorials & Resources
    http://www.macromedia.com/support/search/
    - Macromedia (MM) Technotes
    ==================
    "Mr.Ghost" <[email protected]> wrote in
    message
    news:f060vi$npp$[email protected]..
    > One of my friends advised me to develop my whole site on
    the layout mode
    > as its
    > better than the standard as he says
    > but I couldnot make an ordinary table with rows and
    columns in th layout
    > mode
    > is there any one who can tell me how to?
    > thanx alot
    >

  • How to freeze row and column in JTable

    Hi,
    I need to freeze first two rows and columns in a large JTable. I found ways to freeze either a row or a column, but not both at the same time.
    Can any of you help ?
    Found this code which allows freezing a col. Similar method can be used to freeze column
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JViewport;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableModel;
    public class FrozenTablePane extends JScrollPane{
    public FrozenTablePane(JTable table, int colsToFreeze){
    super(table);
    TableModel model = table.getModel();
    //create a frozen model
    TableModel frozenModel = new DefaultTableModel(
    model.getRowCount(),
    colsToFreeze);
    //populate the frozen model
    for (int i = 0; i < model.getRowCount(); i++) {
    for (int j = 0; j < colsToFreeze; j++) {
    String value = (String) model.getValueAt(i, j);
    frozenModel.setValueAt(value, i, j);
    //create frozen table
    JTable frozenTable = new JTable(frozenModel);
    //remove the frozen columns from the original table
    for (int j = 0; j < colsToFreeze; j++) {
    table.removeColumn(table.getColumnModel().getColumn(0));
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    //format the frozen table
    JTableHeader header = table.getTableHeader();
    frozenTable.setBackground(header.getBackground());
    frozenTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    frozenTable.setEnabled(false);
    //set frozen table as row header view
    JViewport viewport = new JViewport();
    viewport.setView(frozenTable);
    viewport.setPreferredSize(frozenTable.getPreferredSize());
    setRowHeaderView(viewport);
    setCorner(JScrollPane.UPPER_LEFT_CORNER, frozenTable.getTableHeader());
    }

    Hi,
    I need to freeze first two rows and columns in a large JTable. I found ways to freeze either a row or a column, but not both at the same time.
    Can any of you help ?
    Found this code which allows freezing a col. Similar method can be used to freeze column
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.JViewport;
    import javax.swing.table.DefaultTableModel;
    import javax.swing.table.JTableHeader;
    import javax.swing.table.TableModel;
    public class FrozenTablePane extends JScrollPane{
    public FrozenTablePane(JTable table, int colsToFreeze){
    super(table);
    TableModel model = table.getModel();
    //create a frozen model
    TableModel frozenModel = new DefaultTableModel(
    model.getRowCount(),
    colsToFreeze);
    //populate the frozen model
    for (int i = 0; i < model.getRowCount(); i++) {
    for (int j = 0; j < colsToFreeze; j++) {
    String value = (String) model.getValueAt(i, j);
    frozenModel.setValueAt(value, i, j);
    //create frozen table
    JTable frozenTable = new JTable(frozenModel);
    //remove the frozen columns from the original table
    for (int j = 0; j < colsToFreeze; j++) {
    table.removeColumn(table.getColumnModel().getColumn(0));
    table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    //format the frozen table
    JTableHeader header = table.getTableHeader();
    frozenTable.setBackground(header.getBackground());
    frozenTable.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    frozenTable.setEnabled(false);
    //set frozen table as row header view
    JViewport viewport = new JViewport();
    viewport.setView(frozenTable);
    viewport.setPreferredSize(frozenTable.getPreferredSize());
    setRowHeaderView(viewport);
    setCorner(JScrollPane.UPPER_LEFT_CORNER, frozenTable.getTableHeader());
    }

  • KF in row and column

    Hi,
    There is a scenario where, infoprovider has the following Info objects:
    Characteristic Info object 'Type' has the values: A, B.
    'A' represents Plan and 'B' represents Actuals.
    And there are Key Figures(KF) 'Quantity1' and 'Quantity2'.
    Now, I need to display a report with the below Format:
    Plan
    Actual
    Variance
    -|-----||--
    Quantity1    |          |            |                 |
    |------  -|-- ||--
    Quantity 2   |           |           |                |
    Note: Variance = Plan - Actual.
    (KF's in rows and Variance of Plan and Actual in column)
    Is this report possible in BI, If so, please let me know as KF is required to be available in Rows and Columns as well.
    Thanks in advance!!
    Edited by: haripriya a on Jun 16, 2011 4:38 PM

    Hi,
    You can create your query in normal way, say Chars in rows and KFs in columns.
    In the BEx analyzer, you can swap the axes. This way you can achieve your requirement.
    Hope this helps....
    Regards,
    Suman

  • Totals in Row and column

    I have a requirement in report,
    It should display totals in row and column wise,
    Group open     Close     Total     
    A     10     5     15     
    B     15     10     25
    Total     25     15     40
    Thanks,
    Srini

    Send me the template and xml file to [email protected] and I will take a look.
    Thanks,
    BIPuser

  • Row and column headings

    How can I keep my row and column headings fixed on the screen while I scroll through the rest of a large spreadsheet?

    Choose Freeze Header Rows in the Table Format pane.
    Jerry

Maybe you are looking for

  • Query takes time to execute

    I am creating a jsp application . . . .I am retreiving some values from my database oracle 10g..my query taking time to execute even in isql plus..am uisng tomcat5 and oracle 10gR2..can anyone pls tell me why it happens...my query fetches data from f

  • Motion keeps asking me to input my name and serial number!

    It seems like I never had a single problem until I installed leopard. Now 3 out of five times when I launch Motion, I get asked to input my serial number and name, or quit. I have reinput it only to get the same window on the next relaunch of Motion.

  • Iphone 4 unable to update to iOS 5...

    My iphone 4 is unable to update to iOS 5... kept showing error code -23. any1 has same problem?

  • Multi-Branch versioning

    Hi, I understand that iFS presently does basic version control. We are evaluating the possibility of using iFS for a more robust versioning needs. We are primarily concerned about the multi-branching versioning. Requirement: Consider there are 2 fold

  • After recent update to ios8 my music apps wont play but are still on my phone any help much welcome please

    hi people I just upgraded my iphone5 last night to ios8 everything went smooth until today when I tried my music apps and none of them work? Any help welcome guys you how much you need music on the iphone Cheers