RTF template table does not page break correctly.

I have created a purchase order document template. Each po line has 7 rows that are in a rtf table. When I create the po document the po lines get split between pages but I want to keep all lines and print on the next page. I have unchecked the 'allow rows to break between pages' and that doesn't seem to work. Can anyone provide some assistance.
thanks,

Yes, :)
anything is possible, provided the data is there in XML :)
use <?../../ASSET_NUMBER?>
.. will take you one level up, and use them and go the the level where you the field to be displayed.

Similar Messages

  • In Rtf Template ,table is not fit with window after hide columns

    Hi,
    In my RTF template i have table with 5 columns in that 3 colums will display based on condition. During runtime it showing correctly with 5 columns i.e fit to window.
    suppose if any of column is not displayed(hide) and table is shrinking and not fit with window.
    Tried with following option in word doc:
    Right click on table and select Auto Fit--> Auto fit to window. but didn't work. Please let me know is any options to make table to fit with window.
    Thanks..
    Edited by: user9530489 on May 3, 2011 1:09 PM

    Hi,
    I've changed the output device in order to test with the LP01 printer.
    This device is not active in SPAD but if i setup my action with this device I can preview the smartform. It is not possible to preview the smartform with the printer that I'd like to use.
    Any ideas?
    Thanks in advance,
    Stephanie

  • Strange behavior with Report Generation Toolkit. Table does not match array.

    We are using a Word 2003 document (.doc) as a template for a report summary.  This works fine on the development PC.  It fills out the appropriate fields in the document and fills out the table correctly, as shown in the image below.
    However, the same cannot be said on another station.  Although the 2D array is identical, and so is the software to investigate the issue, the table does not get populated correctly.  I have investigated using Word 2010 (.docx) as a template, with the same results.
    I have not been able to figure out what is different between the 2 stations and why it does not work on the 2nd station.  I looked for similar issues on the NI website and the only relevant item from Knowledgebase was concerning new lines within the cell, which is not my case.
    This is what I get on the 2nd machine:
    The array that is sent to the table contains the appropriate data&colon;
    Solved!
    Go to Solution.
    Attachments:
    GoodTableWord.png ‏25 KB
    BadTableWord.png ‏18 KB
    BadTableArray.png ‏22 KB

    And, of course the code snippet that was used:
    It is a sample code that was used to investigate the issue.  It works like the original code on the original development PC, but it does not work on the other station...
    Has anyone seen this bizzare behavior?  If so, how does someone solve it?
    Thanks!
    Attachments:
    sampleCode.png ‏60 KB

  • An error occurred while opening the file, you can not open this file because it does not page???

    Dear all,
    i am test the report to show "No Data Found"  world, but, when i preview to PDF, i got  the message :An error occurred while opening the file, you can not open this file because it does not page.
    i try to load the other xml file that have data, and report work,no error.
    i don't know where is the problem, so i need some help....
    Thanks in advance for your response.
    my rtf report:
    <?call:header?>
    <?if:count(PLAN_CODE)>0?>
    <?for-each@section:G_PLAN_CODE?>
    <?template:Header?>
      <?for-each:G_PURPOSE?>
      <?end for-each?>
    <?end template?>
      <?for-each:G_PLAN_SUBSQL2?>
      <?end for-each?>
    <?end for-each?>
    <?end if?>
    <?if:count(PLAN_CODE)=0?>
    ====================No Data Found ===================
    <?end if?>
    about xml:
    if no data query back:
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    <NARLGLR005>
      <LIST_G_PLAN_CODE></LIST_G_PLAN_CODE>
      <CF_START_DATE>102.3</CF_START_DATE>
      <CF_END_DATE>102.3</CF_END_DATE>
      <CF_TITLE_NAME>Company</CF_TITLE_NAME>
      <CF_OU_NAME>IT Department</CF_OU_NAME>
      <CF_SOURCE_CODE>N/A</CF_SOURCE_CODE>
      <CF_PRINT_DATE>102.11.18  15:48:10</CF_PRINT_DATE>
    </NARLGLR005>
    if have data:
    <?xml version="1.0"?>
    <!-- Generated by Oracle Reports version 6.0.8.27.0 -->
    <NARLGLR005>
      <LIST_G_PLAN_CODE>
        <G_PLAN_CODE>
          <PLAN_CODE>03101C3003</PLAN_CODE>
          <PLAN_NAME>03101C3003_test</PLAN_NAME>
          <PLAN_EM>John</PLAN_EM>
          <PLAN_START_DATE>101.09.01</PLAN_START_DATE>
          <PLAN_END_DATE>102.08.31</PLAN_END_DATE>
          <PLAN_HOSTS>abc_super</PLAN_HOSTS>
          <LIST_G_PURPOSE>
            <G_PURPOSE>
              <PURPOSE_CODE>11600000</PURPOSE_CODE>
              <PURPOSE_NAME>Pre-Pay</PURPOSE_NAME>
              <LIST_G_PURPOSE_CODE>
                <G_PURPOSE_CODE>
                  <BUDGET_AMOUNT>0</BUDGET_AMOUNT>
                  <REAL_BUDGET_AMOUNT>0</REAL_BUDGET_AMOUNT>
                  <TEMP_RECEIPT_AMOUNT>0</TEMP_RECEIPT_AMOUNT>
                  <REAL_PAY_AMOUNT>0</REAL_PAY_AMOUNT>
                  <TEMP_PAY_AMOUNT>-83006</TEMP_PAY_AMOUNT>
                  <TEMP_PAY_FINAL_AMOUNT>83006</TEMP_PAY_FINAL_AMOUNT>
                  <TOTAL_AMOUNT>83006</TOTAL_AMOUNT>
                </G_PURPOSE_CODE>          
              </LIST_G_PURPOSE_CODE>
              <CS_BUDGET_AMOUNT>0</CS_BUDGET_AMOUNT>
              <CS_REAL_BUDGET_AMOUNT>0</CS_REAL_BUDGET_AMOUNT>
              <CS_TEMP_RECEIPT_AMOUNT>0</CS_TEMP_RECEIPT_AMOUNT>
              <CS_REAL_PAY_AMOUNT>0</CS_REAL_PAY_AMOUNT>
              <CS_TEMP_PAY_AMOUNT>0</CS_TEMP_PAY_AMOUNT>
              <CS_TEMP_PAY_FINAL_AMOUNT>0</CS_TEMP_PAY_FINAL_AMOUNT>
              <CS_TOTAL_AMOUNT>0</CS_TOTAL_AMOUNT>
            </G_PURPOSE>      
          </LIST_G_PURPOSE>
          <LIST_G_PLAN_SUBSQL2>
            <G_PLAN_SUBSQL2>
              <GL_DATE>31-07-12</GL_DATE>
              <NARL_DOC_NUMBER>0310107311004</NARL_DOC_NUMBER>
              <AP_UNAPP></AP_UNAPP>
              <PLAN_NAME1>03101C3003_101-102</PLAN_NAME1>
              <PLAN_CODE1>03101C3003</PLAN_CODE1>
              <PLAN_EM1>Elly</PLAN_EM1>
              <PLAN_START_DATE1>2012/09/01 00:00:00</PLAN_START_DATE1>
              <PLAN_END_DATE1>2013/08/31 00:00:00</PLAN_END_DATE1>
              <PLAN_HOSTS1>KIC-Supp</PLAN_HOSTS1>
              <REAL_RECEIPT_AMOUNT>0</REAL_RECEIPT_AMOUNT>
              <DESCRIPTION>101 year</DESCRIPTION>
              <CF_GL_DATE>101.7.31</CF_GL_DATE>
            </G_PLAN_SUBSQL2>
          </LIST_G_PLAN_SUBSQL2>   
          <CF_START_DATE1>99.1</CF_START_DATE1>
          <CF_END_DATE1>102.11</CF_END_DATE1>
          <CF_TITLE_NAME1>TCS Company</CF_TITLE_NAME1>
          <CF_OU_NAME1>IT Department</CF_OU_NAME1>
          <CF_SOURCE_CODE1>plan</CF_SOURCE_CODE1>
          <CF_PRINT_DATE1>102.11.19  17:12:19</CF_PRINT_DATE1>
          <CS_T_BUDGET_AMOUNT>517524</CS_T_BUDGET_AMOUNT>
          <CS_T_REAL_BUDGET_AMOUNT>517524</CS_T_REAL_BUDGET_AMOUNT>
          <CS_T_TEMP_RECEIPT_AMOUNT>289294</CS_T_TEMP_RECEIPT_AMOUNT>
          <CS_T_REAL_PAY_AMOUNT>289294</CS_T_REAL_PAY_AMOUNT>
          <CS_T_TEMP_PAY_AMOUNT>0</CS_T_TEMP_PAY_AMOUNT>
          <CS_T_TEMP_PAY_FINAL_AMOUNT>0</CS_T_TEMP_PAY_FINAL_AMOUNT>
          <CS_T_TOTAL_AMOUNT>228230</CS_T_TOTAL_AMOUNT>
          <CS_REAL_RECEIPT_AMOUNT>289294</CS_REAL_RECEIPT_AMOUNT>
        </G_PLAN_CODE>
      </LIST_G_PLAN_CODE>
      <CF_START_DATE>99.1</CF_START_DATE>
      <CF_END_DATE>102.11</CF_END_DATE>
      <CF_TITLE_NAME>Company</CF_TITLE_NAME>
      <CF_OU_NAME>IT Department</CF_OU_NAME>
      <CF_SOURCE_CODE>N/A</CF_SOURCE_CODE>
      <CF_PRINT_DATE>102.11.18  15:48:10</CF_PRINT_DATE>
    </NARLGLR005>

    Hi,
    You mentioned you tried some steps but I'm not sure what they are, you may try my suggestion to resolve this issue, follow these steps:
    Click Start, right-click Computer, click
    Properties, and then click Advanced system settings.
    On the Advanced tab, click Environment Variables.
    Locate and select the __COMPAT_LAYER variable, and then click Edit.
    Set the value of the __COMPAT_LAYER variable to EnableThemes. Or, delete the __COMPAT_LAYER variable.
    If the issue persists, we can troubleshoot this problem in Clean Boot to determine whether background programs are interfering with PowerPoint:
    http://support.microsoft.com/kb/929135
    Regards,
    Melon Chen
    TechNet Community Support

  • Dynamic tables and conditional page break

    I have inserted a table in my form and have included an Add New Row button to insert additonal rows.   I want a maximum of 16 rows added with a subtotal field.  I want the table, then to automatically go to a new page with a subtotal field.  At the end of all pages I want to include a total field.   The table goes to the next page after a number of rows are entered, but there is not a break;  the original form continues.  How do conditionally break the page and have a (new) table display in the second page?
    Thanks for your help.

    Hi Paul,
    Thanks for working with me on this.   I have sent a copy to the gmail.com address.  I'm new to LiveCycle, so please forgive me.
    Date: Thu, 29 Jul 2010 09:18:53 -0600
    From: [email protected]
    To: [email protected]
    Subject: dynamic tables and conditional page break
    You can accomplish that with a single table and some creative script. I suggest that you get the table worked out and working correctly then we can add in the page totals and final total afterwards. Once the table is ready email the form to mailto:[email protected] and I will put together a sample for you that shows what to do. Please include a description of what you want to do with the email as the mail message and this forum are not tied together. Also if you have a data file  that fills out the table that would be useful as well.
    Paul
    >

  • Advanced Table does not refresh after database level action

    Hi,
    I have a page which has an advanced table. I update the advanced table from the page do some validations, update some DB level columns(also part of advanced table) and see that the changes are saved to the DB but the advanced table does not show the updates done at the DB level.
    I tried clearing the VO Cache and re-executing the VO but still it does not refresh the Advanced table data.
    This is very critical requirement for the client, any inputs will be greatly appreciated.
    Thanks a lot in Advance.
    Here is the code snippet from my CO's processRequest:
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    OAAdvancedTableBean tblbean = (OAAdvancedTableBean)webBean.findChildRecursive("recasttable");
    if(tblbean!=null)
    tblbean.setRendered(true);
    OAApplicationModule tblam = (OAApplicationModule)am.findApplicationModule("RecastLineAM1");
    tblam.invokeMethod("initQuery");
    tblbean.getTableData();
    Here is my AM - initQuery() code:
    public void initQuery()
    //clearVOCaches("RecastLineEO",true);
    clearVOCaches(null,true);
    getRecastLineVO1().init();
    Here is the VO - init() code:
    public void init()
    System.out.println("****************************executing...");
    OADBTransaction tx = (OADBTransaction) getApplicationModule().getTransaction();
    if (tx.getTransientValue("RECAST_ID") !=null)
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("recastId: "+ recastId);
    setWhereClause("RECAST_HDR_ID = :1");
    setWhereClauseParams(null); // Always reset
    setWhereClauseParam(0, recastId);
    executeQuery();
    }

    hi,
    This is how I am calling a DB package. the package does updates on the table. once done I am issueing a commit and requerying the data, however the vo is not getting refreshed.... Can someone point out what am I missing... why is the VO not getting refreshed....
    This is very critical...
    Thanks
    Srini
    public void validateRecast(String respKey)
    OADBTransaction tx = (OADBTransaction)getApplicationModule().getTransaction();
    Number recastId = (Number) tx.getTransientValue("RECAST_ID");
    System.out.println("*********************validateRecast().RecastId: " + recastId);
    OracleCallableStatement ocs = null;
    Connection conn = tx.getJdbcConnection();
    String strOut="", strErr="";
    Number respId = null;
    try
    respId = new Number(respKey);
    catch(Exception e)
    throw new OAException("Invalid Responsibility");
    String stmt = "BEGIN " +
    "GE_RECAST_UTILS_PKG.validate_recast(:1,:2,:3,:4); " +
    "END;";
    try
    ocs = (OracleCallableStatement)conn.prepareCall(stmt);
    ocs.setNUMBER(1,recastId);
    ocs.setNUMBER(2,respId);
    ocs.registerOutParameter(3,OracleTypes.VARCHAR);
    ocs.registerOutParameter(4,OracleTypes.VARCHAR);
    ocs.execute();
    strOut = ocs.getString(3);
    strErr = ocs.getString(4);
    ocs.close();
    System.out.println("Returned with: " + strOut);
    if(strOut.equalsIgnoreCase("ERROR"))
    //throw new OAException(strErr);
    tx.putTransientValue("ERROR",strErr);
    tx.commit();
    getApplicationModule().clearVOCaches("RecastLineEO",true);
    RecastLineVOImpl lineVo = (RecastLineVOImpl)getApplicationModule().findViewObject("RecastLineVO1");
    lineVo.init();
    System.out.println("===============RecastLnId: " +lineVo.first().getAttribute("RecastLnId"));
    System.out.println("===============Product Line: " +lineVo.first().getAttribute("ProductLine"));
    catch(SQLException e)
    tx.rollback();
    if(ocs!=null)
    try
    ocs.close();
    }catch(SQLException e1)
    throw OAException.wrapperException(e1);
    throw OAException.wrapperException(e);
    }

  • Table does not exist in system after DB Connect

    Hi Everyone,
    I must extract data from a oracle db.  I create a source system with DB Connect and it's connect successful.
    Later, i create a datasource for that source system. but it show the table does not exist in system. I'm sure the table is correct. why?
    Thanks!

    Check the schema names & ensure it is with the same owner/name as in the DB source table/view. You can also use a simple lookup table which checks table/views in your schema from other standard tables.

  • Certificate does not contain the correct site name

    Hello,
    I have to make a midlet that connect to a tomcat 5.5.9 server with ssl.
    I import the certificate whit tomcat alias in the wireless toolkit but when i run the midlet this error appear: Certificate does not contain the correct site name
    import java.io.*;
    import javax.microedition.midlet.*;
    import javax.microedition.io.*;
    import javax.microedition.lcdui.*;
    public class HelloNet extends MIDlet implements CommandListener , Runnable{
    // User interface command to exit the current
    // application.
    private Command exitCommand = new Command("Exit",
    Command.EXIT, 2);
    // User interface command to issue an HTTP GET
    // request.
    private Command getCommand = new Command("Get",
    Command.SCREEN, 1);
    /// The current display object.
    private Display display;
    // The url to GET from the 'net.
    private String url;
    * Initialize the MIDlet with a handle to the
    * current display.
    public HelloNet() {
    url = "https://127.0.0.1:8443/Hello.txt";
         display = Display.getDisplay(this);
    * This lifecycle method should return immediately
    * to keep the dispatcher
    * from hanging.
    public void startApp() {
         showPrompt();
    * Display the main screen.
    void showPrompt() {
    String s = "Press Get to fetch " + url;
    TextBox t = new TextBox("Http Result", s,
    s.length(), 0);
    t.addCommand(exitCommand);
    t.addCommand(getCommand);
    t.setCommandListener(this);
         display.setCurrent(t);
    * pauseApp signals the thread to stop by clearing
    * the thread field.
    * If stopped incorrectly, it will be restarted from
    * scratch later.
    public void pauseApp() {
    * destroyApp must cleanup everything. The thread
    * is signaled
    * to stop and no result is produced.
    * @param unconditional is a flag to indicate that
    * forced shutdown
    * is requested
    public void destroyApp(boolean unconditional) {
    * commandAction responds to commands
    * @param c command to perform
    * @param s Screen displayable object
    public void commandAction(Command c, Displayable s) {
         if (c == exitCommand) {
         destroyApp(false);
         notifyDestroyed();
         } else if (c == getCommand) {
              Thread th= new Thread (this);
              th.start();
    * Read the content of the page.
    public void run() {
    TextBox t = null;
    StringBuffer b = new StringBuffer();
    HttpsConnection c = null;
    InputStream is = null;
         try {
         int len = 0;
         int ch = 0;
         System.out.println("Cerco di leggere");
    c = (HttpsConnection)Connector.open(url);
    c.setRequestMethod(HttpsConnection.GET);
         is = c.openInputStream();
    // length of content to be read.
    len = (int) c.getLength();
    if (len != -1) {
    // Read exactly Content-Length bytes
    for(int i=0; i<len; i++) {
    if((ch = is.read()) != -1) {
    b.append((char) ch);
    } else {
    // Read until connection is closed.
    while((ch = is.read()) != -1) {
    len = is.available();
    b.append((char) ch);
    t = new TextBox("Https Result", b.toString(),
    b.length(), 0);
         } catch (Exception e) {
    e.printStackTrace();
    String s = e.toString();
    if(s != null) {
    t = new TextBox("Https Error", s, s.length(),
    0);
    } finally {
    if (is != null) {
         try {
              is.close();
         } catch (Exception ce) { }
    if (c != null) {
         try {
              c.close();
         } catch (Exception ce) { }
    display.setCurrent(t);
    }

    re: code tags, please see http://forum.java.sun.com/help.jspa?sec=formatting.
    As for the rest:
    See, we now know that you used keytool to generate you certificate. You need a new certificate. This time, when keytool asks you for a first and last name, type 127.0.0.1.

  • Managed System Configuration ! The table does not contain any data !

    Hi,
    In Sol Man Setup , Managed System Configuration, in phase 6 - Create Logical Componets -
    There is no Product Version and Product Instance Available.
    The message is :  " The table does not contain any data "
    How can correct this problem ?
    Thanks

    Hi,
    while creating new Logical Component via SMSY , you need to specify Product first.
    e.g. if you managed system is ERP 6.0 , select Product as SAP ERP
    once you select Product , it automatically fetches information for product Version and Main Instance depending upon Product field input.
    Please check and let us know if issue still persits.
    Thanks,
    Rupali

  • Oam does not show the correct configuration information

    Oracle apps,
    An issue with the oam.
    There are 2 nodes in our system. In 12
    One is for db and cm
    The other is for forms and apache.
    The system is running fine.
    But from the OAM, where it does not show the correct configuration info.
    From the OAM, all the services are (including db, cm, forms, apache) on one node.
    The issue might be caused by the fact that the web tier was cloned from the cm tier as a workaround for some patch errors in web tier.
    I even used the EXEC FND_CONC_CLONE.SETUP_CLEAN; to clean the system tables and ran
    Autocfg on all tiers. But it didn’t solve this issue.
    How can I fix this OAM problem to make it show the correct information?
    Thanks,
    Lily

    Thanks for reply.
    Yes, I did commit it.
    The hostname information is correct.
    On oam, this web node is there but all the service actually running on this node is
    showing under the cm node .
    <TIER_DB oa_var="s_isDB">NO</TIER_DB>
    <TIER_ADMIN oa_var="s_isAdmin">YES</TIER_ADMIN>
    <TIER_WEB oa_var="s_isWeb">YES</TIER_WEB>
    <TIER_FORMS oa_var="s_isForms">YES</TIER_FORMS>
    <TIER_NODE oa_var="s_isConc">YES</TIER_NODE>
    <TIER_FORMSDEV oa_var="s_isFormsDev">YES</TIER_FORMSDEV>
    <TIER_NODEDEV oa_var="s_isConcDev">YES</TIER_NODEDEV>
    <TIER_WEBDEV oa_var="s_isWebDev">YES</TIER_WEBDEV>

  • Cannot retrieve table metadata - Table does not exist: ODP source 0WRKCNT_CATG_TEXT does not exist

    Hi, when i able to import the 0WRKCNT_CATG_TEXT extractor into source system i am getting the above bug Cannot retrieve table metadata - Table does not exist: ODP source <0WRKCNT_CATG_TEXT> does not exist, i have been checked in RSA5 T code to check the object is active or not, its active and its available in ROOSATTR table with enabled mode,but still its showing the error, can anyone help on this ..

    Hi Airings,
    'ORA-00942: table or view does not exist'
    According to the error message, it seems that the migrating table or view does not exist in the database, or SSMA does not have access to it. To troubleshoot the issue, please check the following things.
     1. Verify that if the spelling of the table or view name is correct.
     2. If the table or view exists but is in a different schema from the current schema where the SQL is executing (in other word, the table doesn’t own by you, but owned by other user), the ORA-00942 error will return too. Resolve this by
    explicitly reference the table or view by specifying the schema name (schema_name.table_name).
    3. SSMA queries some additional catalog tables that you may not have permission to, please make sure that you grant the account permission to
     read sys.mlog$. For more details, please review this similar thread:
    Bug in SSMA For Oracle 6.0 for non-dba Oracle user.
    Reference:
    ORA-00942 Table or View Does Not Exist Oracle Error
    Thanks,
    Lydia Zhang
    Lydia Zhang
    TechNet Community Support

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

  • HP Officejet 6000 Wireless - Does not print black correctly.

    HP Officejet 6000 Wireless - Does not print black correctly.
    Previously the printer was printing fine.
    This evening I printed a diagram I made in MS PowerPoint. The diagram contained black and red text along with black, red, and blue lines. When I took the printed page from the printer, all the black items looked faded. Instead of black, they printed as a light, faded gray. The red and blue printed correctly.
    Another user of the printer printed some documents around the same time. These documents had nothing but black text. Every page this user printed showed up completely blank. The black was not even faded. There were no signs of anything being printed on the pages at all.
    It seemed strange that one print job would print faded black and the other printed nothing. Considering the possibility that the ink was low, a new black cartridge was placed into the printer. The exact same results occured. My diagram printed correctly except for the fact that the things that were supposed to be black were coming up as light gray. Once again, the documents printed by the other user came up completely blank.
    I ran a print test on the printer. It printed a Windows logo with the word "Windows" below. The logo printed correctly. The text showed up as a light, faded gray.
    A third user printed an Excel spreadsheet. The cell borders were printed as a light gray. Nothing else printed. Everything in the spreadsheet was supposed to be black.
    The third user also printed a recipe from MS Word. Most of the text showed up as a light, faded gray. Some text did not show up at all. I could not see any correlation between what showed up in faded gray and what did not show up.
    It seems to me that if something was wrong with the cartridges, it would either always be faded or not print at all. I can consistently get some things to print faded and other things to not print at all. Color always prints correctly.
    The print jobs were sent to the printer wirelessly from three different computers. Two computers run Windows 7 (x64). The third computer runs Windows XP SP2.
    As far as I can tell, nothing was changed or done differently between now and the last time something printed correctly.
    Might this be a driver issue? Since the printing consistently prints one way for certain files and another way for other files, I don't see it as being caused by hardware. If it's not a software issue, what could possibly cause the effects I described above?

    This article should help resolve your partial/blank pages:
    http://h10025.www1.hp.com/ewfrf/wc/document?docnam​e=c01892627&cc=us&dlc=en&lc=en
    Give the steps listed under your operating system a try and let us know if it helps.
    Best of Luck!
    You can say thanks by clicking the Kudos Star in my post. If my post resolves your problem, please mark it as Accepted Solution so others can benefit too.

  • Row action event on data table does not occur when rows added dynamically

    Row action event on data table does not occur (only refreshes the page) when the rows in the data table are added dynamically at run time using button click and java bean.
    please tell me a way to catch the row click event when adding rows dynamically to data table. i m using RAD 6.0 to develop Faces jsp pages.
    thanks
    amit

    i got the answer

  • Short dump 'Table does not exist in database'

    Hello All,
    When a report is executing it is going to short dump by saying 'Table does not exist in database'. As per the short dump analysis this issue is happening because of the following   Native SQL statement statement :
    Program :  %_T050N0 (This is a dynamic  program generating by SAP )
    Form Name :  DYN_LIC_SEL_TOT
    exec sql performing LOOP_MOVE_WRITE_ISAP.
    select single_plate, itm_num, ctry_code, model_lot,
    lic_hold_flg, qty into :dcat-lplate, :dcat-matnr,
    :dcat-werks, :dcat-charg, :dcat-holdflag,
    :dcat-qty from ZLICENSE_R2 where itm_num   = :p_matnr and
                    model_lot = :p_charg
    endexec.
    As per the customer this issue occurring since they migrated the SAP  back-end data base from Oralce to DB6. Here I felt that ZLICENSE_R2 is not migrated from the  Oracle to DB6. But as per the BASIS Team, even this table was not maintained in Oracle also. If the table was not maintained in the Oracle, this issue should have been there even before migration also.
    Following is the short dump details:
    Short text
        Table does not exist in database.
    What happened?
        The table or view name used does not
        exist in the database.
        The error occurred in the current database connection "DEFAULT".
    What can you do?
        Check the spelling of the table names in your report.
        Note down which actions and inputs caused the error.
        To process the problem further, contact you SAP system
        administrator.
        Using Transaction ST22 for ABAP Dump Analysis, you can look
        at and manage termination messages, and you can also
        keep them for a long time.
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_NATIVE_SQL_ERROR', was not
         caught in
       procedure "DYN_LIC_SEL_TOT" "(FORM)", nor was it propagated by a RAISING
    clause.
    Since the caller of the procedure could not have anticipated that the
    exception would occur, the current program is terminated.
    The reason for the exception is:
    Triggering SQL statement: "select single_plate, itm_num, ctry_code, model_lot,
    lic_hold_flg, qty from ZLICENSE_R2 where itm_num = ? and model_lot = ? "
    Database error code: "-204"
    Could you please  let me know what might be the reason for this issue.
    Many Thanks in Advance.

    Transaction SE11, input ZLICENSE_R2 for table name, and display the table. Did the table display? If not, that is the main problem.
    If the table displays, go to menu item Utilities -> Database Object -> Database Utility
    In the resulting screen, under the "Status" fields, you should see text "Exists in the database." If you don't, then the table exists in the dictionary, but doesn't exist in the database system. Click the "Create database table" button and then you should be able to run the program.
    You may need basis team's help to carryout some of these actions.

Maybe you are looking for

  • I want to install windows on my mac pro but my superdrive is dead...

    I have a 2008 Mac Pro (Intel) running 10.10.  I'm trying to install windows (8.1) on my machine which I have done several times before (mostly XP and windows 7).  I've created a bootable USB drive using bootcamp but my machine won't boot from it or r

  • Create GPP drive mapping entries programmatically

    Can anyone provide any sample codes that creates drive mapping entries in group policy preference? I am not looking for script to create the GPO, I am looking for codes to create mapping entries inside it instead. I've been searching for MS document

  • Find suspected duplicates after import

    I have approximately 11,000 photos to organize.  I created a catalog name and chose to skip suspected duplicates.  Approximately 8,000 photos were imported.  This is reasonable since I consolidated photos from current drives and backups of two comput

  • Transaction SM04

    hai all, i want to know the data displayed in transaction SM04 is taken from which tables?Like the list of table(s) from which data about no. of users logged in on a server, the transaction codes being used on each terminal etc.

  • Flash CS4 crashing when scrubbing playhead or using certain tools

    I am currently having the unfortunate experience of learning Flash Pro as part of my degree program at school. I have been having a problem with the program crashing repeatedly. I have CS4 Web Premium, an educational discount edition, and am using it