Does Coloring Of Rows and Column in Query effect the Performance of Query

Hi to all,
Does Coloring of Rows and Column in Query via WAD or Report designer , will effect the performance of query.
If yes, then how.
What are the key factor should we consider while design of query in regards of Query performance.
I shall ne thankful to you for this.
Regards
Pavneet Rana

There will not be any significance perofrmance issue for Colouring the rows or columns...
But there are various performance parameters which should be looked into while designing a query...
Hope this PPT helps you.
http://www.comeritinc.com/UserFiles/file/tips%20tricks%20to%20speed%20%20NW%20BI%20%202009.ppt
rgds, Ghuru

Similar Messages

  • JTable about selection mode, setting a Color to rows and column.

    I need an application with a table containing Double and String data. When the table is shown the Double data must be shown as selected. I need a special kind of selection mode similar to MULTIPLE_INTERVAL_SELECTION but it must be a mode as if CONTROL was pressed when the user left clicks the table so he or she can select and deselect columns without deselecting those wich have been selected previously... Besides I need to paint columns and rows only if they have certain conditions. This is an example of what I have done so far... The selection mode is what is really important.
    UsingJTable.java
    package mytables;
    import java.awt.BorderLayout;
    import java.awt.Color;
    import java.awt.FlowLayout;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.JButton;
    import javax.swing.JFrame;
    import javax.swing.JPanel;
    import javax.swing.JScrollPane;
    import javax.swing.JTable;
    import javax.swing.ListSelectionModel;
    import javax.swing.table.TableColumn;
    public class UsingJTable extends JFrame {
    private static final long serialVersionUID = 1L;
    private JPanel panel = null;
    private JTable table = null;
    private JButton[] buttonArray = null;
    private JPanel buttonsPanel = null;
    public UsingJTable() {
    panel = new JPanel(); 
    table = new JTable( new MyOwnTableModel() );
    JScrollPane sPane = new JScrollPane( table ); 
    sPane.setHorizontalScrollBarPolicy( JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED );
    sPane.setVerticalScrollBarPolicy( JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED );
    panel.setOpaque( true );
    panel.add( sPane );
    buttonsPanel = new JPanel();
    buttonsPanel.setLayout( new FlowLayout() );
    buttonArray = new JButton[ 5 ];
    for( int i = 0; i < buttonArray.length; i++ ) {
    buttonArray[ i ] = new JButton( "columna " + i );
    buttonArray[ i ].addActionListener( new ColumnListener( i ) );
    buttonsPanel.add( buttonArray[ i ] );
    table.setRowSelectionAllowed( false );
    table.setColumnSelectionAllowed( true );
    ListSelectionModel csm = table.getColumnModel().getSelectionModel();
    csm.setSelectionInterval( 0, table.getColumnCount() );
    csm.removeSelectionInterval( 0, table.getColumnCount() - 3 );
    csm.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION );
    this.setTitle( "Using JTable" );
    this.getContentPane().add( panel );
    this.getContentPane().add( buttonsPanel, BorderLayout.SOUTH );
    this.setSize( 500, 500);
    this.setVisible( true );
    this.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
    class ColumnListener implements ActionListener {
    private boolean pressed = false;
    private int column = 0;
    public ColumnListener( int col) {
    this.setColumn( col );
    public void actionPerformed(ActionEvent e) {
    TableColumn tColumn = table.getColumnModel().getColumn( column );
    Color c;
    if ( !pressed )
    c = Color.YELLOW;
    else
    c = Color.WHITE;
    table.setVisible( false );
    tColumn.setCellRenderer( new MyCellRenderer( c ) );
    table.setVisible( true );
    pressed = !pressed;
    public int getColumn() {
    return column;
    public void setColumn(int column) {
    this.column = column;
    public static void main( String args[] )
    new UsingJTable();
    } MyOwnTableModel.java
    package mytables;
    import javax.swing.table.AbstractTableModel;
    public class MyOwnTableModel extends AbstractTableModel {
    private static final long serialVersionUID = 1L;
    private Object data[][] = null;
    private String columnNames[] = null;
    private int rowCount = 0;
    private int columnCount = 0;
    public MyOwnTableModel() {
    initData();
    initColumnNames();
    this.setRowCount( data.length );
    this.setColumnCount( columnNames.length );
    public int getColumnCount() {
    return columnCount;
    public int getRowCount() {
    return rowCount;
    public Object getValueAt(int r, int c) {
    return data[ r ][ c ];
    private void initData() {
    data = new Object[4][5];
    data[ 0 ][ 0 ] = new String("Hern�n");
    data[ 0 ][ 1 ] = new String("Amaya");
    data[ 0 ][ 2 ] = new Integer( 23 );
    data[ 0 ][ 3 ] = new Double( 61.5 );
    data[ 0 ][ 4 ] = new Double( 1.71 );
    data[ 1 ][ 0 ] = new String("Mariana");
    data[ 1 ][ 1 ] = new String("Amaya");
    data[ 1 ][ 2 ] = new Integer( 25 );
    data[ 2 ][ 3 ] = new Double( 75 );
    data[ 2 ][ 4 ] = new Double( 1.65 );
    data[ 2 ][ 0 ] = new String("Nicol�s");
    data[ 2 ][ 1 ] = new String("Coniglio");
    data[ 2 ][ 2 ] = new Integer( 23 );
    data[ 2 ][ 3 ] = new Double( 88.5 );
    data[ 2 ][ 4 ] = new Double( 7.85 );
    data[ 3 ][ 0 ] = new String("Juan Pablo");
    data[ 3 ][ 1 ] = new String("Garribia");
    data[ 3 ][ 2 ] = new Integer( 24 );
    data[ 3 ][ 3 ] = new Double( 70.2 );
    data[ 3 ][ 4 ] = new Double( 1.76 );
    private void initColumnNames() {
    columnNames = new String[ 5 ];
    columnNames[ 0 ] = "Nombre";
    columnNames[ 1 ] = "Apellido";
    columnNames[ 2 ] = "Edad";
    columnNames[ 3 ] = "Peso";
    columnNames[ 4 ] = "Altura";
    public String[] getColumnNames() {
    return columnNames;
    public void setColumnNames(String[] columnNames) {
    this.columnNames = columnNames;
    public Object[][] getData() {
    return data;
    public void setData(Object[][] data) {
    this.data = data;
    public void setColumnCount(int columnCount) {
    this.columnCount = columnCount;
    public void setRowCount(int rowCount) {
    this.rowCount = rowCount;
    public Class getColumnClass(int c) {
    return data[0][c].getClass();
    public String getColumnName(int c) {
    return columnNames[ c ];
    } MycellRenderer.java
    package mytables;
    import java.awt.Color;
    import java.awt.Component;
    import javax.swing.JTable;
    import javax.swing.table.DefaultTableCellRenderer;
    public class MyCellRenderer extends DefaultTableCellRenderer {
    private static final long serialVersionUID = 1L;
    private Color cellColor = null;
    public MyCellRenderer( Color c )
    setCellColor( c );
    public Component getTableCellRendererComponent
    (JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    // Obtains default cell settings
    Component cell = super.getTableCellRendererComponent ( table, value, isSelected, hasFocus, row, column);
    cell.setBackground( getCellColor());
    return cell;
    public Color getCellColor() {
    return cellColor;
    public void setCellColor(Color cellColor) {
    this.cellColor = cellColor;
    }

    Interesting concept! This is what I have tried and it works, but in the application I need the user to deselect the columns he wants only by left clicking on them... This is the main idea: there will be lots of columns (String and Double data). The user must deselect the Double columns he or she does not want to be processed... Maybe with a boolean array that changes it state if a user left clicks a column... but I suppose this method is called only once to initialize the table, isn't it? Thanks.
    <code>
    table = new JTable( new MyOwnTableModel() ) {
    public boolean isCellSelected(int row, int column) {
    MyOwnTableModel model = (MyOwnTableModel) this.getModel();
    if( model.getColumnClass( column ) == Double.class )
    return true;
    return false;
    </code>

  • JTable Problem (table does not show rows and columns)

    Hi All,
    What the table is suppose to do.
    - Load information from a database
    - put all the values in the first column
    - in the second column put combobox (cell editor with numbers 1-12)
    - the 3rd column put another combobox for something else
    - the 4th column uses checkbox as an edit
    The number of rows of the table should be equal to the number of
    record from
    the database. If not given it default to 20 (poor but ok for this)
    The number of columns is 4.
    But the table does not show any rows or
    column when I put it inside a
    JScrollPane (Otherwise it works).
    Please help,
    thanks in advance.
    public class SubjectTable extends JTable {
    * Comment for <code>serialVersionUID</code>
    private static final long serialVersionUID = 1L;
    /** combo for the list of classes */
    protected JComboBox classCombo;
    /** combo for the list of subjects */
    protected JComboBox subjectsCombo;
    /** combo for the list of grade */
    protected JComboBox gradeCombo;
    boolean canResize = false;
    boolean canReorder = false;
    boolean canSelectRow = false;
    boolean canSelectCell = true;
    boolean canSelectColumn = true;
    // the row height of the table
    int rowHeight = 22;
    // the height of the table
    int height = 200;
    // the width of the table
    int width = 300;
    // the size of the table
    Dimension size;
    * Parameterless constructor. Class the one of the other constructors
    to
    * create a table with the a new <code>SubjectTableModel</code>.
    public SubjectTable() {
    this(new SubjectTableModel());
    * Copy constructor to create the table with the given
    * <code>SubjectTableModel</code>
    * @param tableModel -
    * the <code>SubjectTableModel</code> with which to
    initialise
    * the table.
    SubjectTable(SubjectTableModel tableModel) {
    setModel(tableModel);
    setupTable();
    * Function to setup the table's functionality
    private void setupTable() {
    clear();
    // set the row hieght
    this.setRowHeight(this.rowHeight);
    // set the font size to 12
    //TODO this.setFont(Settings.getDefaultFont());
    // disble reordering of columns
    this.getTableHeader().setReorderingAllowed(this.canReorder);
    // disble resing of columns
    this.getTableHeader().setResizingAllowed(this.canResize);
    // enable the horizontal scrollbar
    this.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
    // disable row selection
    setRowSelectionAllowed(this.canSelectRow);
    // disable column selection
    setColumnSelectionAllowed(this.canSelectColumn);
    // enable cell selection
    setCellSelectionEnabled(this.canSelectCell);
    setPreferredScrollableViewportSize(getSize());
    TableColumn columns = null;
    int cols = getColumnCount();
    for (int col = 0; col < cols; col++) {
    columns = getColumnModel().getColumn(col);
    switch (col) {
    case 0:// subject name column
    columns.setPreferredWidth(130);
    break;
    case 1:// grade column
    columns.setPreferredWidth(60);
    break;
    case 2:// class room column
    columns.setPreferredWidth(120);
    break;
    case 3:// select column
    columns.setPreferredWidth(65);
    break;
    } // end switch
    }// end for
    // set up the cell editors
    doGradeColumn();
    doClassColumn();
    //doSubjectColumn();
    * Function to clear the table selection. This selection is different
    to
    * <code>javax.swing.JTable#clearSelection()</code>. It clears the
    user
    * input
    public void clear() {
    for (int row = 0; row < getRowCount(); row++) {
    for (int col = 0; col < getColumnCount(); col++) {
    if (getColumnName(getColumnCount() - 1).equals("Select")) {
    setValueAt(new Boolean(false), row, getColumnCount() - 1);
    }// if
    }// for col
    }// for row
    * Function to set the cell renderer for the subjects column. It uses
    a
    * combobox as a cell editor in the teacher's subjects table.
    public void doSubjectColumn() {
    TableColumn nameColumn = getColumnModel().getColumn(0);
    nameColumn.setCellEditor(new DefaultCellEditor(getSubjectsCombo()));
    // set up the celll renderer
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for drop down list");
    nameColumn.setCellRenderer(renderer);
    // Set up tool tip for the sport column header.
    TableCellRenderer headerRenderer = nameColumn.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer) {
    ((DefaultTableCellRenderer) headerRenderer)
    .setToolTipText("Click the Name to see a list of choices");
    }// end doSubjectsColumn----------------------------------------------
    /** Function to set up the grade combo box. */
    public void doGradeColumn() {
    TableColumn gradeColumn = getColumnModel().getColumn(1);
    gradeColumn.setCellEditor(new DefaultCellEditor(getGradeCombo()));
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for drop down list");
    gradeColumn.setCellRenderer(renderer);
    // Set up tool tip for the sport column header.
    TableCellRenderer headerRenderer = gradeColumn.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer) {
    ((DefaultTableCellRenderer) headerRenderer)
    .setToolTipText("Click the Grade to see a list of choices");
    }// end doGradeColumn-------------------------------------------------
    * Function to setup the Class room Column of the subjects
    public void doClassColumn() {
    // set the column for the classroom
    TableColumn classColumn = getColumnModel().getColumn(2);
    classColumn.setCellEditor(new DefaultCellEditor(getClassCombo()));
    DefaultTableCellRenderer renderer = new DefaultTableCellRenderer();
    renderer.setToolTipText("Click for drop down list");
    classColumn.setCellRenderer(renderer);
    // Set up tool tip for the sport column header.
    TableCellRenderer headerRenderer = classColumn.getHeaderRenderer();
    if (headerRenderer instanceof DefaultTableCellRenderer) {
    ((DefaultTableCellRenderer) headerRenderer)
    .setToolTipText("Click the Class to see a list of choices");
    }// end doClassColumn--------------------------------------------------
    * Function to get the size of the table
    * @return Returns the size.
    public Dimension getSize() {
    if (this.size == null) {
    this.size = new Dimension(this.height, this.width);
    return this.size;
    * Function to set the size of the table
    * @param dim
    * The size to set.
    public void setSize(Dimension dim) {
    if (dim != null) {
    this.size = dim;
    return;
    * Function to create/setup the class room comboBox. If the comboBox
    is
    * <code>null</code> a nwew one is created else the functon returns
    the
    * function that was returned initially.
    * @return Returns the classCombo.
    private JComboBox getClassCombo() {
    if (this.classCombo == null) {
    this.classCombo = new JComboBox();
    // fill up the class name combo
    ArrayList classRooms = new ArrayList();
    try {
    //TODO classRooms = Settings.getDatabase().getClassRooms();
    for (int i = 0; i < 10; i++) {
    String string = new String("Class");
    string += i;
    if (!classRooms.isEmpty()) {
    classRooms.trimToSize();
    for (int i = 0; i < classRooms.size(); i++) {
    this.classCombo.addItem(classRooms.get(i));
    } catch (Exception e) {
    e.printStackTrace();
    return this.classCombo;
    * Function to create/setup the subjects comboBox. If the comboBox is
    * <code>null</code> a nwew one is created else the functon returns
    the
    * function that was returned initially.
    * @return Returns the subjectsCombo.
    private JComboBox getSubjectsCombo() {
    if (this.subjectsCombo == null) {
    this.subjectsCombo = new JComboBox();
    try {
    ArrayList subjects = loadSubjectsFromDatabase();
    if (!subjects.isEmpty()) {
    Iterator iterator = subjects.iterator();
    while (iterator.hasNext()) {
    // create a new subject instance
    //TODO Subject subct = new Subject();
    // typecast to subject
    //TODO subct = (Subject) iterator.next();
    String name = (String) iterator.next();
    // add this subject to the comboBox
    //TODO this.subjectsCombo.addItem(subct.getName());
    subjectsCombo.addItem(name);
    }// end while
    }// end if
    else {
    JOptionPane.showMessageDialog(SubjectTable.this,
    "Subjects List Could Not Be Filled");
    System.out.println("Subjects List Could Not Be Filled");
    } catch (Exception e) {
    e.printStackTrace();
    return this.subjectsCombo;
    * Function to load subjects from the <code>Database</code>
    * @return Returns the subjects.
    private ArrayList loadSubjectsFromDatabase() {
    // list of all the subject that the school does
    ArrayList subjects = new ArrayList();
    try {
    //TODO to be removed later on
    for (int i = 0; i < 10; i++) {
    String string = new String("Subject");
    string += i;
    subjects.add(i, string);
    // set the school subjects
    //TODO subjects = Settings.getDatabase().loadAllSubjects();
    } catch (Exception e1) {
    e1.printStackTrace();
    return subjects;
    * Function to create/setup the grade comboBox. If the comboBox is
    * <code>null</code> a nwew one is created else the functon returns
    the
    * function that was returned initially.
    * @return Returns the gradeCombo.
    private JComboBox getGradeCombo() {
    if (this.gradeCombo == null) {
    this.gradeCombo = new JComboBox();
    // fill with grade 1 to 12
    for (int i = 12; i > 0; i--) {
    this.gradeCombo.addItem(new Integer(i).toString());
    return this.gradeCombo;
    public static void main(String[] args) {
    try {
    UIManager.setLookAndFeel(new Plastic3DLookAndFeel());
    System.out.println("Look and Feel has been set");
    } catch (UnsupportedLookAndFeelException e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    SubjectTableModel model = new SubjectTableModel();
    int cols = model.getColumnCount();
    int rows = model.getRowCount();
    Object[][] subjects = new Object[rows][cols];
    for (int row = 0; row < rows; row++) {
    subjects[row][0] = new String("Subjectv ") + row;
    }//for
    model.setSubjectsList(subjects);
    SubjectTable ttest = new SubjectTable(model);
    JFrame frame = new JFrame("::Table Example");
    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setViewportView(ttest);
    frame.getContentPane().add(scrollPane);
    frame.pack();
    frame.setVisible(true);
    **************************************END
    TABLE******************************
    ----------------------------THE TABLE
    MODEL----------------------------------
    * Created on 2005/03/21
    * SubjectTableModel
    package com.school.academic.ui;
    import javax.swing.table.AbstractTableModel;
    * Class extending the <code>AbstractTableModel</code> for use in
    creating the
    * <code>Subject</code>s table. In addition to the implemented methods
    of
    * <code>AbstractTableModel</code> The class creates a model that has
    initial
    * values - the values have their own <code>getter</code> and
    * <code>setter</code> methods - but can still be used for values that
    a user
    * chooses.
    * <p>
    * @author Khusta
    public class SubjectTableModel extends AbstractTableModel {
    * Comment for <code>serialVersionUID</code>
    private static final long serialVersionUID = 3257850978324461113L;
    /** Column names for the subjects table */
    String[] columnNames = { "Subject", "Grade", "Class Room",
    "Select" };
    /** Array of objects for the subjects table */
    Object[][] subjectsList;
    private int totalRows = 20;
    protected int notEditable = 0;
    * Parameterless constructor.
    public SubjectTableModel() {
    // TODO initialise the list
    // add column to the default table model
    this.subjectsList = new
    Object[getTotalRows()][getColumnNames().length];
    * Copy constructor with the <code>subjectList</code> to set
    * @param subjects
    public SubjectTableModel(Object[][] subjects) {
    this(0, null, subjects, 0);
    * Copy constructor with the initial number of row for the model
    * @param rows -
    * the initial rows of the model
    * @param cols -
    * the initial columns of the model
    * @param subjects -
    * the initial subjects for the model
    * @param edit - the minimum number of columns that must be
    uneditable
    public SubjectTableModel(int rows, String[] cols, Object[][]
    subjects, int edit) {
    // set the initial rows
    setTotalRows(rows);
    // set the column names
    setColumnNames(cols);
    // set the subjectlist
    setSubjectsList(subjects);
    //set not editable index
    setNotEditable(edit);
    * Function to get the total number of columns in the table
    * @return int -- the columns in the table
    public int getColumnCount() {
    if (this.subjectsList == null) {
    return 0;
    return getColumnNames().length;
    * Function to get the total number of rows in the table
    * @return int -- the rows in the table
    public int getRowCount() {
    if (this.subjectsList == null) {
    return 0;
    return this.subjectsList.length;
    * Function to get the name of a column in the table.
    * @param col --
    * the column to be named
    * @return String -- the column in the table
    public String getColumnName(int col) {
    if (getColumnNames()[col] != null) {
    return getColumnNames()[col];
    return new String("...");
    * Function to get the value of the given row.
    * @param row --
    * the row of the object.
    * @param col --
    * the col of the object.
    * @return Object -- the value at row, col.
    public Object getValueAt(int row, int col) {
    return getSubjectsList()[row][col];
    * Function to return the data type of the given column.
    * @param c --
    * the column whose type must be determined.
    * @return Class -- the type of the object in this col.
    public Class getColumnClass(int c) {
    if (getValueAt(0, c) != null) {
    return getValueAt(0, c).getClass();
    return new String().getClass();
    * Function to put a value into a table cell.
    * @param value --
    * the object that will be put.
    * @param row --
    * the row that the object will be put.
    * @param col --
    * the col that the object will be put.
    public void setValueAt(Object value, int row, int col) {
    * TODO: Have a boolean value to determine whether to clear or
    to set.
    * if true clear else set.
    if (value != null) {
    if (getSubjectsList()[0][col] instanceof Integer
    && !(value instanceof Integer)) {
    try {
    getSubjectsList()[row][col] = new
    Integer(value.toString());
    fireTableCellUpdated(row, col);
    } catch (NumberFormatException e) {
    * JOptionPane .showMessageDialog( this., "The \""
    +
    * getColumnName(col) + "\" column accepts only
    values
    * between 1 - 12");
    return;
    System.out.println("Value = " + value.toString());
    System.out.println("Column = " + col + " Row = " + row);
    // column = Grade or column = Select
    switch (col) {
    case 2:
    try {
    // TODO
    if (Boolean.getBoolean(value.toString()) == false
    && getValueAt(row, 0) != null
    && getValueAt(row, 1) != null
    && getValueAt(row, 2) != null) {
    // subjectsList[row][col + 1] = new
    Boolean(true);
    System.out.println("2. false - Updated...");
    * this.subjectListModel.add(row,
    * this.subjectsList[row][0] + new String(" -
    ") +
    * this.subjectsList[row][2]);
    } catch (ArrayIndexOutOfBoundsException exception) {
    exception.printStackTrace();
    break;
    case 3:
    if (Boolean.getBoolean(value.toString()) == false
    && getValueAt(row, 0) != null
    && getValueAt(row, 1) != null
    && getValueAt(row, 2) != null) {
    System.out.println("3. If - Added...");
    getSubjectsList()[row][3] = new Boolean(true);
    this.subjectListModel.addElement(this.subjectsList[row][0] +
    * new String(" - ") + this.subjectsList[row][2]);
    // subjectListModel.remove(row);
    fireTableCellUpdated(row, col);
    fireTableDataChanged();
    // this.doDeleteSubject();
    } else if (Boolean.getBoolean(value.toString()) ==
    true
    && getValueAt(row, 0) != null
    && getValueAt(row, 1) != null
    && getValueAt(row, 2) != null) {
    setValueAt("", row, col - 1);
    setValueAt("", row, col - 2);
    setValueAt("", row, col - 3);
    System.out.println("3. Else - Cleared...");
    // this.subjectListModel.remove(row);
    break;
    default:
    break;
    }// end switch
    getSubjectsList()[row][col] = value;
    fireTableCellUpdated(row, col);
    fireTableDataChanged();
    }// end if
    }// end
    * Function to enable edition for all the columns in the table
    * @param row --
    * the row that must be enabled.
    * @param col --
    * the col that must be enabled.
    * @return boolean -- indicate whether this cell is editble or
    not.
    public boolean isCellEditable(int row, int col) {
    if (row >= 0
    && (col >= 0 && col <= getNotEditable())) {
    return false;
    return true;
    * Function to get the column names for the model
    * @return Returns the columnNames.
    public String[] getColumnNames() {
    return this.columnNames;
    * Function to set the column names for the model
    * @param cols
    * The columnNames to set.
    public void setColumnNames(String[] cols) {
    // if the column names are null the default columns are used
    if (cols != null) {
    this.columnNames = cols;
    * Function to get the rows of subjects for the model
    * @return Returns the subjectsList.
    public Object[][] getSubjectsList() {
    if (this.subjectsList == null) {
    this.subjectsList = new
    Object[getTotalRows()][getColumnNames().length];
    return this.subjectsList;
    * Function to set the subjects list for the model
    * @param subjects
    * The subjectsList to set.
    public void setSubjectsList(Object[][] subjects) {
    // if the subject list is null create a new one
    // using default values
    if (subjects == null) {
    this.subjectsList = new
    Object[getTotalRows()][getColumnNames().length];
    return;
    this.subjectsList = subjects;
    * Function to get the total number of rows for the model. <b>NB:
    </b> This
    * is different to <code>
    getRowCount()</code>.<code>totalRows</code>
    * is the initial amount of rows that the model must have before
    data can be
    * added.
    * @return Returns the totalRows.
    * @see #setTotalRows(int)
    public int getTotalRows() {
    return this.totalRows;
    * Function to set the total rows for the model.
    * @param rows
    * The totalRows to set.
    * @see #getTotalRows()
    public void setTotalRows(int rows) {
    // if the rows are less than 0 the defaultRows are used
    // set getTotalRows
    if (rows > 0) {
    this.totalRows = rows;
    * Function to get the number of columns that is not editble
    * @return Returns the notEditable.
    public int getNotEditable() {
    return this.notEditable;
    * Function to set the number of columns that is not editable
    * @param notEdit The notEditable to set.
    public void setNotEditable(int notEdit) {
    if (notEdit < 0) {
    notEdit = 0;
    this.notEditable = notEdit;
    ----------------------------END TABLE MODEL----------------------------------

    I hope you don't expect us to read hundreds of lines of unformatted code? Use the "formatting tags" when you post.
    Why are you creating your own TableModel? It looks to me like the DefaultTableModel will store you data. Learn how to use JTable with its DefaultTableModel first. Then if you determine that DefaultTableModel doesn't provide the required functionality you can write your own model.

  • Key figures in row and column.

    Dear all,
    I have a requirement in my BEx query to have to key figures in both the row and column. This is the scenario, I have a formula defined in the row which does a total up and the user would like to see this key figure formula in the column while still maintaining all other key figures in the row. How can this be done?
    It seems that once I have a key figure in either the column or row I can only use either one- not both at the same time.
    Thanks in advance and points will be awarded.

    Hi,
    You can use KF in either in Row or Column.It's not possible to use in both in rows and columns.
    Regards,
    Jayapal

  • 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

  • Search row and column for return value

    Dear Sir/Madam,
                               I have a problem for searching spreadsheet and hope you can help me out a bit.  Im pretty new to Labview and Im currently using Labview 8.0.  My task is to search the spreadsheet I have attached in row and column-wise, then return the corresponding value out.  I had an attempt in doing this as you can see from the vi that i have attached.  I try inputting the 'read from measurement file' into an array and using delete, index and search array I will be able to find the index value for the relevant row and column that i searched for by inputting them into an index array with the orginal array from the 'read from measurement file'.
                              So ultimately, when i enter a row value of 0.5 and a column value of 0.3, my output will be 1.688.
                              I can't see any mistakes in my logic but I getting really strange results, like I can read my data has been entered into an array but when i try deleting the first column and put it into another array, the orginal array with nothing deleted is outputted hence making my search to give out -1 value. So could you take a look please and give me any suggestion that can solve my problem or enhance the code a bit.  Thank you for your time.
    Best Regards,
    Coato
    P.s for some reason i can't attached the .lvm file of my data hence i have attached the excel version but i think you need to convert it back to .lvm for the 'read from measurement file' function to work.
    Attachments:
    Backswing compensation.csv ‏10 KB
    Backswing comnpensation2.vi ‏109 KB

    Your VI makes absolutely no sense to me, but maybe I don't understand what you are trying to do.
    You seem to have dynamic data with 6 signals and 48 points/channel. Now you reshape this into an array of dynamic data with 4x13 elements from which you slice out one row or column, resp. "delete from array" is NOT the correct tool to do this, use "Index array" with one index unwired to get a row or column as 1D array.
    So you end up with two 1D arrays of dynamic data that you search for DBL. It is difficult to understand how you want to search for an array element that corresponds to a scalar DBL value of 0.1. Your array elements are NOT DBLs but dynamic data, each containing many signals!
    There are two elements on all your data that are "3", the rest are zero. You will never find anything that is 0.1.
    Maybe you can convert your original dynamic data to a 2D array with "rows are signals" using "convert from dynamic data", then operate on the 2D array.
    Coato wrote:
                              So ultimately, when i enter a row value of 0.5 and a column value of 0.3, my output will be 1.688.
    Sorry, Please explain.
    Please make a VI containing a simple 2D aray as diagram constant that contains e.g. 5x5 typical values. Let us know what kind of result you expect from your algorithm..
    LabVIEW Champion . Do more with less code and in less time .

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

  • Populate multiple rows and columns based off of a single cell

    Does anyone know a way to populate multiple rows and columns based off of the input of a single cell. I'm trying to create a workout tracker that auto populates from a master list of workouts. Example, in A2 the user selects the workout from a drop down menu (St1, St2, St3, etc) and the workout is pulled from the master list and is populated into B2:C5.
    I'm using =LOOKUP(A2,Master :: A2:A32,Master :: C2:C32) right now, but it's only drawing the top column. I'm looking for an edit for the formula (or completely new formula) that will place the info from the 1st column of the Master table into the 1st column of the Auto Tracker 1 table and then on down until the 4th column.
    Here is a screen shot of what I have now:
    And an example of what I'd like to accomplish:
    Any and all help is appreciated, and please let me know if there is any more info that I can give that'd help out.

    Hi Mike,
    Your screenshots show that you have merged some cells in Column A of both tables. That may be the reason why the LOOKUP function is having trouble working out which range of cells to examine.
    Hope this helps.
    Regards,
    Ian.

  • 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

  • Get Row and Column info from an Array Cluster

    I have an array with a cluster of 2 elements (string and double). Within my application, I am using the State Machine architecture with an Event Structure. When I click on a element within the cluster array, is there a way to retrieve the row and column? I seen the Coordinates within the Mouse Down event but I don't think that will work.
    Any ideas?
    Solved!
    Go to Solution.

    How To Return the Index of a Mouse-Select Array Element:
    https://decibel.ni.com/content/docs/DOC-6406
    Jean-Marc
    LV2009 and LV2013
    Free PDF Report with iTextSharp

  • Rows and column limit on Data Grids

    Hello,
    anyone know if there's a limit for the number of rows and columns per page in the Data Grids?
    Thanks in advance

    There is not a limit. There is a default of 1024 rows, but you can change this.
    -- Chris

  • Spry tables: row and column rollover

    I have created some tables with spry and they are very nice.
    I got the nice rollover effect to work on the rows, but the table
    has enough rows and columns that if the the row AND column where
    highlighted that would be even better. Is there a way to get the
    row and column to highlight at the same time (Essentially
    highlighting or intersecting at particular cell or data point)?
    Thanks.

    http://lawrence.ecorp.net/inet/samples/dhtml-rollover-tble-cols-rows.shtml

  • Rows and Columns Help

    Previously in AI9 when I wanted to modify a matrix I had created using Rows and Columns, I would select the cells of the matrix and then click on Rows and Columns.  Now I have CS4 and the documentation says I should be able to do the same thing using Area Type Options.  However, when I select the cells of a matrix that I created in AI9, Area Type Options is ghosted out.  How do I modify this matrix?

    I would copy and paste in front before I try this.
    Then select the text that is place the text cursor in a the text frame you want to split or select it with a selection tool.
    then see if the Type>Area Text Options are available. They should be.
    If not that means they are object paths not Area Text.
    Click the Frame with the Area Text tool to make it a Area Text Frame now the options should be available.
    The way to tell if these are object paths is to select one and go to the Object >Path>Split into Grid and if that is available then it is an object path.
    The text engine and this feature has changed in AI CS1 and that is probably the cause for the translation to get a bit messed up.

  • How to color Rows and Columns of BI Query

    Hi to all,
    I have created BI query in query designer, with 2 structures for rows and Columns.
    Now I need that certain rows can be colored orange and certain columns as green color.
    I knew that it can be done in Query designer, but slice and dice reporting can not be done, which I required in my report.
    Is there any way I can do in WAD.
    or any other way to do that.
    i shall be thankfull to you for this.
    Regards
    Pavneet Rana

    Hi Rana,
    You can do the coloring of KF values using the report designer tool.
    Check the below links
    http://help.sap.com/SAPhelp_nw70/helpdata/en/dd/cea14119eb9f09e10000000a155106/frameset.htm
    [Creating Formatted reports using BEx Report Designer|http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/00ae5173-6112-2d10-d78f-e7779d269f25?QuickLink=index&overridelayout=true]
    Regards
    KP

  • How to increase the row and Column length of Bex query in EP Portal 7.3

    Dear All,
    Please let me know the process  to Increase the Rows and Columns  Size of Bex Query in Enterprise Portal  of SAP  7.3 .
    Please  let settings to increase rows up 10000 and column 100 in one page.
    Thanks
    Regards,
    Sai

    Dear All,
    Please find the attached screen shot.
    The report be open with 4 or 5 columns and 5 or 6 rows.
    So, please  let me know how to increase the length of the table.
    Do the needful for me to over come this issue.
    Thanks
    Regards,
    Sai.

Maybe you are looking for

  • FI-AA: Unable to settle costs off of AUC

    In Depreciation area 01 (Book Depreciation), planned/posted values were recorded on an AUC via settlement from WBS Elements during FY 2006. In Depreciation area 80 (Insurance Values), planned/posted values were recorded on an AUC via settlement from

  • Why pn-begda and pn-endda not filled ? but pn-begps and pn-endps filled.

    Hi, Im using logical database PNP. in all my reports, whenever i fillPayroll period, the from date and enddate (pn-begda and pn-endda) is populated for the  given pay period. In one of my report, these value (pn-begda and endda) are blank. pn-begps a

  • I have to press so many times the home button

    Trouble in Home button. I have to press more then one time to work

  • Firefox will not load any page.

    Looked at the article "Firefox can't load websites but other browsers can" but I'm an idiot and can't figure out what I'm supposed to look for. The instructions of where to go in IE are different than my IE. So, don't really know what I'm looking for

  • Removing all prior info from imac we sold

    We purchased a new imac from the Apple Store online which will arrive in a few days. Our G5 iMac has been sold and we would like to prepare it so that all personal information and files are removed before the new owner picks it up. Please assist us i