Problems to get Jtable's data

Hi
I have has probles when I tried to get dato of my table, my table has 3 JComboBox, this is my code
jTable1.setModel(new DefaultTableModel(
new Object [][]
{null, null, null, null},
new String []
"Columna", "Operador", "Valor", "L\u00f3gico"
TableColumn operateColumn = jTable1.getColumnModel().getColumn(1);
//Se crea y llena ComboBox
JComboBox comboBox2 = new JComboBox();
comboBox2.addItem("Es igual que");
comboBox2.addItem("Es mayor que");
comboBox2.addItem("Es menor que");
operateColumn.setCellEditor(new DefaultCellEditor(comboBox2));
// The rest of the JComboBox
And this is my Method to get the data, but it dosen't work, Could you help me?
private void jButtonAceMouseClicked(MouseEvent evt)
String strQuery = "SELECT ";
Object ob = new Object();
int indexCombo;
for (int i=1;i<=jTable1.getRowCount();i++)
for (int j=1;j<=jTable1.getColumnCount();j++)
if (j==2)
indexCombo = 0;
indexCombo = comboBox2.getSelectedIndex();
ob = jTable1.getValueAt(i,j);
}

        for (int i=0;i<jTable1.getRowCount();i++) {
            for (int j=0;j<jTable1.getColumnCount();j++) {
                Object value = jTable1.getValueAt(i,j);
                System.out.println(
                        " row="    + i +
                        " column=" + j +
                        " value="  + ( value != null ? value : "null" )
            System.out.println("");
        }

Similar Messages

  • Problem in getting the pricing data

    Hi all,
        I'm trying to create a service contract. When i do this, an error pops up saying 'Pricing data for Business Partner could not be found'.
        I've configured the pricing procedure for BP and created condition records as well. I even replicated the condition objects from R/3. Still I'm getting the same error.
    Can anyone help me out in this regard
    Thanks...
    Regards

    Hi, this problem can be located in various area's so I would need some more info from your side to determine the cause of it. I assume you have an IPC in you landscape? If so, did you test IPC's pricing functionlity from within the IPC? Did you replicate all your condition related information from SAP R/3? Have you successfully been able to find your BP pricing record in your condition table? Thanks, Tiest.

  • Problem in getting data on button submit

    I have 3 combo boxes in a form & a button on the other html form
    when the user will change the combo box, the form will be submitted with the values of all three combo boxes.
    And when the button is pressed it will again submit the form along with all the values of comboboxes & same values in different variables. I am doing this so the new variables can be used to call the discoverer sheet & old can be used to mantain the state of the combo boxes.
    The datasheet will not be populated on change of combo boxes, but will only show the data when the button is pressed.
    The problem i am getting the user is not getting the required data on the first click of the button, but when the button is pressed for the second time, the user will get the required result.
    Follwing is the chunk of code that I am using.
    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    </head>
    <script type="text/javascript">
    function myFunc(){
         document.forms["form1"].elements["GRP"].disabled=false;
         document.forms["form1"].elements["RGN"].disabled=false;
         var i = document.forms["form1"].elements["GRP"].value;
         var j = document.forms["form1"].elements["RGN"].value;
         var k = document.forms["form1"].elements["BR"].value;
         if(j == 0){
              submitform();
         else{
              submitform();
         if(k == 0){
              submitform();
         else{
              //makeGRPDisable();          
              //makeRGNDisable();          
              submitform();
    function submitform()
    document.form1.submit();
    function submitform2()
    document.form2.submit();
    var queryString;
    function getParameter( parameterName ) {
    queryString = window.location.search.substring(1).toLowerCase();
    //alert(queryString);
    //if (queryString.length==0) {return "null";}
    var parameters = new Array();
    parameters = queryString.split('&');
    for(var i = 0; i < parameters.length; i++) {
    //alert(parameters);
    //alert(parameters[i].indexOf(parameterName));
    if (parameters[i].indexOf(parameterName.toLowerCase())>=0) {
    //alert(parameters[i]);
    var parameterValue = new Array();
    parameterValue = parameters[i].split('=');
    return parameterValue[1];
    return null;
    var Pgid = getParameter('_pageid');
    var Gid = getParameter('GRP');
    var Rid = getParameter('RGN');
    var Bid = getParameter('BR');
    var Gid2 = getParameter('GRP2');
    var Rid2 = getParameter('RGN2');
    var Bid2 = getParameter('BR2');
    var ALid = getParameter('AL');
    </script>
    </head>
    <body>
    <table width="100%" border="1" cellpadding="0" bordercolor="#F26520" bgcolor="#FFFFFF">
    <tr>
    <td>
    <form name="form1" action="http://cdbo:7778/portal/page? method="GET">
    <oracle>
    declare
    theUser varchar2(30) := portal.WWCTX_API.get_user;
    Uid2 varchar2(30);
    begin
    htp.p('<input type="hidden" name="_pageid" value="553,142908" />');
    htp.p('<input type="hidden" name="_dad" value="portal" />');
    htp.p('<input type="hidden" name="_schema" value="PORTAL" />');
    htp.p('<input type=hidden name="AL" value=' || :v_al_id || '>');
    IF :v_al_id=0 THEN
    IF :v_group_id=0 AND :v_region_id=0 AND :v_branch_id=0 THEN
         htp.p('<select name="GRP" onChange="submitform()">');
         htp.p('<option value=0>All</option>');
         for i in (select groupcode, groupshortname from GROUPS@cdb)
         loop
              htp.p('<option value="' || i.groupcode || '">' || i.groupshortname || '</option>');
         end loop;
         htp.p('</select>');
         htp.p('<select name=RGN onChange="myFunc()">');
         htp.p('<option value=0>All</option>');
              htp.p('</select>');
         htp.p('<select name=BR onChange="submitform()">');
         htp.p('<option value=0>All</option>');
         htp.p('</select>');
    END IF;
    END IF;
    END;
    </oracle>
    </form>
    </td>
    <form name="form2" action="http://cdbo:7778/portal/page? method="GET">
    <td>
    <oracle>BEGIN
    IF :v_group_id=0 AND :v_region_id=0 AND :v_branch_id=0 THEN
         htp.p('<input type="hidden" name="_pageid" value="553,142812" />');
         htp.p('<input type="hidden" name="_dad" value="portal" />');
         htp.p('<input type="hidden" name="_schema" value="PORTAL" />');
         htp.p('<input type=hidden name="AL" value=' || :v_al_id || '>');
         htp.p('<input type=hidden name="GRP" value=' || :v_group_id || '>');
         htp.p('<input type=hidden name="RGN" value=' || :v_region_id || '>');
         htp.p('<input type=hidden name="BR" value=' || :v_branch_id || '>');
         htp.p('<input type=hidden name="GRP2" value=' || :v_group_id || '>');
         htp.p('<input type=hidden name="RGN2" value=' || :v_region_id || '>');
         htp.p('<input type=hidden name="BR2" value=' || :v_branch_id || '>');
         htp.p('<input type=button value=Submit onClick=submitform2()>');
    END IF;
    END;
    </oracle>
    </form>
    </td>
    </tr>
    </table>
    </body>
    </html>
    Regards
    AkS!

    AkS,
    I think I get it. You want the user to be able to change the combo boxes as they like, but the report is only refreshed when they click on the submit button. I don't understand why you need to refresh the screen each time a combo is selected, but I'm guessing that the values in the second and third combo boxes will vary depending on the selection made in the first.
    You could achieve this using AJAX calls, but that gets into a whole new game.
    I'm puzzled about the if ... then test to see that the fields are all set to 0 (that equates to "all" I think. If I read your code right, that means the form is only displayed if the user selects all from each combo. There's also a closing " mark missing at the end of the form action (you should't need the question mark - it will be added automatically).
    Using a GET method is good because you can see the parameters on the url, but It might be helpful to change the type of the inputs in form2 from hidden to text fields so you can see what Portal is seeing. It won't change the functionality, but it may help you see if the values are being set at the correct time.
    Finally, have you checked the cache settings for the page?
    I can't think of anything else to suggest.
    Patrick.

  • Problem in getting the BASKET HEADER DATA in java class?

    Hi Gurus,
    In the order_change.jsp i have created a new custom input field and when i give some text in it, i should pass this as extension data. For this i have created a class to add this extension data:
    UserSessionData userSessionData = UserSessionData.getUserSessionData(request.getSession());
    BusinessObjectManager isaBOM = (BusinessObjectManager)userSessionData.
                                                          getBOM(BusinessObjectManager.ISACORE_BOM);
    ZCustomer mybom = (ZCustomer) userSessionData.getBOM(ZCustomer.ZCUSTOM_BOM);
    Basket basket = isaBOM.getBasket();
    HeaderData  headerData = isaBOM.getBasket().getHeaderData();
    String extBasketHeaderData = request.getParameter("test");     
    headerData.addExtensionData("ZTEST", extBasketHeaderData);
    But iam getting a null pointer execption when the following is executed in the above code
    HeaderData  headerData = isaBOM.getBasket().getHeaderData();
    Can you please help me why i am getting null pointer exception when i try to get the header data.
    I have tried interpreting my action class with the following classes
    1. ordersend.do
    2. maintainorder.do
    2.orderchangeconfirmed.do
    but not able to get the header data if include in any of the above the action class.
    Please help me out in this regard.
    Thanks a lot in Advance.
    Regards,
    Lakshman.

    Hi All,
    I have a similar kind of problem. I want to add extension data to a standard FM . But when I am creating a basket object
    Basket basket = isaBOM.getBasket();   I am getting an error saying
                                                    Type mismatch:Cannot convert from void to basket
    and also If I am trying to import
                                                    import com.sap.isa.businessobject.order.Basket;
    I am getting an error saying
                         This compilation unit indirectly references the missing type com.sap.isa.businessobject.BusinessObjectBase(typically some required class file is referencing a type outside the classpath)
    Kindly help me on this.
    Thanks
    Harshmeet Singh

  • How do i get backed up purchases from an old iphone to a new one, but the only problem is an ipod is backed up into the new phone and i cant get my iphone data on to the new phone because its under i pod

    how do i get backed up purchases from an old iphone to a new one, but the only problem is an ipod is backed up into the new phone and i cant get my iphone data on to the new phone because its under i pod?

    Thanks very much!
    Although I had to add everything again to the playlist, at least I can just copy it over in future!

  • TS1559 i have problem with my iphone as it is disable and need to get all my data as the phone needs at least 40 years to enable accessing it

    I have problem with my iphone as it is disable and need to get all my data as the phone needs at least 40 years to enable accessing it

    If you have never connected the phone to iTunes and backed it up or used iCloud to backup your data, it is lost at this point.
    The only way to get back into the phone is to restore it.
    ~Lyssa

  • Downloading problem::getting only partial data from the net, why ??

    hi
    i am trying to download a file using the code
    InputStream getStream(){
    try {
    URL url = new URL("http://www.etc..");
    URLConncection urlconn= url.openConnection();
    InputStream in =urlconn.getInputStream();
    return in;
    }catch(MalformedURLException ){...}
    catch(IOException ioe){...}
    the problem is it is not getting the complete data.
    i tried to download a file which is 46k but it got only 1.3k
    can any one tell what to add or modify the above code so that i will be getting the complete data
    thanks in advance
    have a nice time
    krishna
    email id:[email protected]

    Try to set the request property and usecaches like
    this:
    con.setUseCaches(false);
    con.setRequestProperty ("Content-Type",
    "application/octet-stream")
    not working, i tried to download 46663 bytes got only 1369 bytes,please suggest me another solution.
    thanks in advance
    krishna

  • Problem in getting MM data into CM

    Hi
    I have configured Cash Management module and integrated MM, SD with forecasting. I am able to get the SD data into the forecast but not able to see the MM data in the forecast
    I created PR but its level "M1" is not getting reflected in the forecast.
    Please advice
    Thanks

    Beside the "Logistic level" (OT47), you must configure the "Structure" - OT17.
    The Payment term must be filled in the Purchase order.

  • Problem printing the JTable

    Hi all,
    I have a problem with printing JTable.
    My application has a submit button,JTable and Print Button.
    As I click on the Submit button, the data is retrieved from the Database(MS Access) and displayed on the JTable.
    Now when I click on the Print button, the printer properties dialog box is displayed. But when I click on the print button in the dialog box, nothing is printed on the paper.
    I checked the printers and faxes in the control panel, It showed Java printing under the Document name and Printing under the Status. It is displayed for sometime and then disappeared after some time. But nothing is printed on the paper(not even the blank paper).
    I tried a lot but couldn't understand the problem.
    I have used the following files:
    PrintJTable.java
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.print.*;
    import java.awt.geom.*;
    import java.awt.Dimension;
    import java.applet.*;
    import java.sql.*;
    import java.util.*;
    import java.net.*;
    import java.lang.*;
    import javax.swing.table.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    class PrintJTable implements ActionListener,Printable
    Connection connect;
    ResultSet rs;
    JTable table;
    JScrollPane tableAggregate;
    DisplayTable displayTable;
    JButton print,submitButton;
    public PrintJTable()
    JFrame frame = new JFrame("Table");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}});
    connect();
    displayTable= new DisplayTable();
    JButton submitButton= new JButton("SUBMIT");
    submitButton.addActionListener(this);
    JButton printButton= new JButton("PRINT!");
    // for faster printing turn double buffering off
    RepaintManager.currentManager( frame).setDoubleBufferingEnabled(false);
    printButton.addActionListener( new ActionListener(){
    public void actionPerformed(ActionEvent evt) {
    PrinterJob pj=PrinterJob.getPrinterJob();
    pj.setPrintable(PrintJTable.this);
    pj.printDialog();
    try{
    pj.print();
    }catch (Exception PrintException) {}
    tableAggregate = createTable();
    tableAggregate.setBorder(new BevelBorder(BevelBorder.LOWERED));
    frame.getContentPane().setLayout(new BorderLayout());
    frame.getContentPane().add(submitButton,BorderLayout.NORTH);
    frame.getContentPane().add(tableAggregate,BorderLayout.CENTER);
    frame.getContentPane().add(printButton,BorderLayout.SOUTH);
    frame.pack();
    frame.setVisible(true);
    } // end of constructor
    public void connect()
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("Opening db connection");
    connect = DriverManager.getConnection("jdbc:odbc:Driver={MicroSoft Access Driver (*.mdb)};DBQ=C:/db1.mdb","","");
    catch (ClassNotFoundException ex) {
    System.err.println("Cannot find the database driver classes.");
    System.err.println(ex);
    catch (SQLException ex) {
    System.err.println("Cannot connect to this database.");
    System.err.println(ex);
    public JScrollPane createTable() {
    displayTable= new DisplayTable();
    JTable table = new JTable(displayTable);
         table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
         table.getTableHeader().setReorderingAllowed(false);
    JScrollPane scrollpane = new JScrollPane(table,
    JScrollPane.VERTICAL_SCROLLBAR_ALWAYS,
    JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS);
    return scrollpane;
    } // end of createTable()
    public void actionPerformed(ActionEvent ie)
    try
    Statement statement6=connect.createStatement();
    ResultSet rs6=statement6.executeQuery("select * from benf_details");
    displayTable.executeQuery(rs6);
    statement6.close();
    catch(SQLException sqle)
    JOptionPane.showMessageDialog(null,"error2"+sqle);
    }// end of actionPerformed
    public int print(Graphics g, PageFormat pageFormat, int pageIndex) throws PrinterException {
    Graphics2D g2 = (Graphics2D)g;
    g2.setColor(Color.black);
    int fontHeight=g2.getFontMetrics().getHeight();
    int fontDesent=g2.getFontMetrics().getDescent();
    double pageHeight = pageFormat.getImageableHeight()-fontHeight; //leave room for page number
    double pageWidth = pageFormat.getImageableWidth();
    System.out.println("page width = " + pageWidth );
    double tableWidth = (double) table.getColumnModel().getTotalColumnWidth();
    System.out.println("table width = " + tableWidth );
    double scale = 1;
    if (tableWidth >= pageWidth) {
    scale = pageWidth / tableWidth;
    System.out.println("scale = " + scale );
    double headerHeightOnPage = table.getTableHeader().getHeight() * scale;
    double tableWidthOnPage = tableWidth * scale;
    double oneRowHeight = (table.getRowHeight() + table.getRowMargin()) * scale;
    int numRowsOnAPage = (int)((pageHeight - headerHeightOnPage) / oneRowHeight);
    double pageHeightForTable = oneRowHeight * numRowsOnAPage;
    int totalNumPages = (int)Math.ceil(((double)table.getRowCount())/numRowsOnAPage);
    if(pageIndex >= totalNumPages) {
    return NO_SUCH_PAGE;
    g2.translate(pageFormat.getImageableX(), pageFormat.getImageableY());
    g2.drawString("Page: "+ (pageIndex + 1),(int)pageWidth / 2 - 35,
    (int)( pageHeight + fontHeight - fontDesent ));//bottom center
    g2.translate( 0f, headerHeightOnPage );
    g2.translate( 0f, -pageIndex * pageHeightForTable );
    //If this piece of the table is smaller than the size available,
    //clip to the appropriate bounds.
    if (pageIndex + 1 == totalNumPages) {
    int lastRowPrinted = numRowsOnAPage * pageIndex;
    int numRowsLeft = table.getRowCount() - lastRowPrinted;
    g2.setClip(0, (int)(pageHeightForTable * pageIndex),
    (int) Math.ceil(tableWidthOnPage),
    (int) Math.ceil(oneRowHeight * numRowsLeft));
    //else clip to the entire area available.
    else{
    g2.setClip(0, (int)(pageHeightForTable * pageIndex),
    (int) Math.ceil(tableWidthOnPage),
    (int) Math.ceil(pageHeightForTable));
    g2.scale(scale,scale);
    table.paint(g2);
    g2.scale(1/scale,1/scale);
    g2.translate( 0f, pageIndex * pageHeightForTable);
    g2.translate( 0f, -headerHeightOnPage);
    g2.setClip(0, 0,(int) Math.ceil(tableWidthOnPage), (int)Math.ceil(headerHeightOnPage));
    g2.scale(scale,scale);
    table.getTableHeader().paint(g2);//paint header at top
    return Printable.PAGE_EXISTS;
    } // end of print()
    public static void main(String[] args) {
    new PrintJTable();
    }// end of PrintJTable
    DisplayTable.java
    import java.util.Vector;
    import java.sql.*;
    import javax.swing.*;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.event.TableModelEvent;
    public class DisplayTable extends AbstractTableModel {
    Connection connection;
    Statement statement;
    ResultSet resultSet;
    String[] columnNames = {};
    Vector          rows = new Vector();
    ResultSetMetaData metaData;
    String db_uname,db_passwd;
    public DisplayTable() {
    public void executeQuery(ResultSet resultSet) {
    try {
    metaData = resultSet.getMetaData();
    int numberOfColumns = metaData.getColumnCount();
    columnNames = new String[numberOfColumns];
    // Get the column names and cache them.
    // Then we can close the connection.
    for(int column = 0; column < numberOfColumns; column++) {
    columnNames[column] = metaData.getColumnLabel(column+1);
    // Get all rows.
    rows = new Vector();
    while (resultSet.next()) {
    Vector newRow = new Vector();
    for (int i = 1; i <= getColumnCount(); i++) {
         newRow.addElement(resultSet.getObject(i));
    rows.addElement(newRow);
    // close(); Need to copy the metaData, bug in jdbc:odbc driver.
    fireTableChanged(null); // Tell the listeners a new table has arrived.
    catch (SQLException ex) {
    System.err.println(ex);
    public void close() throws SQLException {
    System.out.println("Closing db connection");
    resultSet.close();
    statement.close();
    connection.close();
    protected void finalize() throws Throwable {
    close();
    super.finalize();
    // Implementation of the TableModel Interface
    // MetaData
    public String getColumnName(int column) {
    if (columnNames[column] != null) {
    return columnNames[column];
    } else {
    return "";
    public Class getColumnClass(int column) {
    int type;
    try {
    type = metaData.getColumnType(column+1);
    catch (SQLException e) {
    return super.getColumnClass(column);
    switch(type) {
    case Types.CHAR:
    case Types.VARCHAR:
    case Types.LONGVARCHAR:
    return String.class;
    case Types.BIT:
    return Boolean.class;
    case Types.TINYINT:
    case Types.SMALLINT:
    case Types.INTEGER:
    return Integer.class;
    case Types.BIGINT:
    return Long.class;
    case Types.FLOAT:
    case Types.DOUBLE:
    return Double.class;
    case Types.DATE:
    return java.sql.Date.class;
    default:
    return Object.class;
    // to make the cells editable
    public boolean isCellEditable(int row, int column) {
    try {
    return metaData.isWritable(column+1);
    catch (SQLException e) {
    return false;
    public int getColumnCount() {
    return columnNames.length;
    // Data methods
    public int getRowCount() {
    return rows.size();
    public Object getValueAt(int aRow, int aColumn) {
    Vector row = (Vector)rows.elementAt(aRow);
    return row.elementAt(aColumn);
    public String dbRepresentation(int column, Object value) {
    int type;
    if (value == null) {
    return "null";
    try {
    type = metaData.getColumnType(column+1);
    catch (SQLException e) {
    return value.toString();
    switch(type) {
    case Types.INTEGER:
    case Types.DOUBLE:
    case Types.FLOAT:
    return value.toString();
    case Types.BIT:
    return ((Boolean)value).booleanValue() ? "1" : "0";
    case Types.DATE:
    return value.toString(); // This will need some conversion.
    default:
    return "\""+value.toString()+"\"";
    public void setValueAt(Object value, int row, int column) {
    try {
    String tableName = metaData.getTableName(column+1);
    // Some of the drivers seem buggy, tableName should not be null.
    if (tableName == null) {
    System.out.println("Table name returned null.");
    String columnName = getColumnName(column);
    String query =
    "update "+tableName+
    " set "+columnName+" = "+dbRepresentation(column, value)+
    " where ";
    // We don't have a model of the schema so we don't know the
    // primary keys or which columns to lock on. To demonstrate
    // that editing is possible, we'll just lock on everything.
    for(int col = 0; col<getColumnCount(); col++) {
    String colName = getColumnName(col);
    if (colName.equals("")) {
    continue;
    if (col != 0) {
    query = query + " and ";
    query = query + colName +" = "+
    dbRepresentation(col, getValueAt(row, col));
    System.out.println(query);
    System.out.println("Not sending update to database");
    // statement.executeQuery(query);
    catch (SQLException e) {
    // e.printStackTrace();
    System.err.println("Update failed");
    Vector dataRow = (Vector)rows.elementAt(row);
    dataRow.setElementAt(value, column);
    }

    Java 1.5 incorporates a very simple way to print from a JTable. I am using a mysql DB but it is the same concept. Review my code and let me know if you have any questions.
    package emsmain;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.*;
    import java.sql.*;
    import java.text.MessageFormat;
    import java.util.*;
    import javax.print.*;
    import javax.print.attribute.HashPrintRequestAttributeSet;
    import javax.print.attribute.PrintRequestAttributeSet;
    import javax.swing.*;
    import javax.swing.JTable;
    import javax.swing.table.*;
    import java.awt.print.*;
    public class TableFromDatabase extends JFrame implements ActionListener{
        JButton jbtprint = new JButton("Print Report");
        JTable Reporttable;
        Connection conn = Connect_Database.getConnection();
         public TableFromDatabase()
    Vector columnNames = new Vector();
    Vector data = new Vector();     
              try{  
                String query = null;
                Statement ps = null;
                ResultSet rs = null;
                  //Class Master List
                  if (Report_Menu.jrbMaster_list.isSelected()){
                      query =("Select * from students") ;
                  //Classes taken by student
                  if (Report_Menu.jrbClass_taken.isSelected()){
                      String taken = Report_Menu.jtfStudent.getText();
                      query = ("select program.course_num, course_name, course_start_date, course_stat_desc from registration, program where student_id = '"+taken+"' and program.course_num = registration.course_num");
                  //Birthday report
                  if (Report_Menu.jrbBirthday.isSelected()){
                      String birthday = (String) Report_Menu.jcb_birthday.getSelectedItem();
                      query = ("SELECT student_id, fname, lname, address, city, state_name, zipcode, dob FROM students where substring(dob, 6,2) = '"+birthday+"'"); 
                  //Course Catologue
                  if (Report_Menu.jrbCourseCatologue.isSelected()){
                      String course = (String) Report_Menu.jcbChooseCourse.getSelectedItem();
                      query = ("select  course_name, course_length, course_cost, course_credits from course where course_name = '"+course+"'");
                  //Certification expiration report
                  if (Report_Menu.jrbExpiration.isSelected()){
                      String month = (String) Report_Menu.jcbMonth.getSelectedItem();
                      String year = (String) Report_Menu.jcbYear.getSelectedItem();
                      query = ("SELECT FNAME, LNAME FROM STUDENTS, REGISTRATION WHERE substring(expiration_date, 6,2) = '"+month+"' and substring(expiration_date, 1,4) = '"+year+"' and registration.student_id = students.student_id") ;
                  //Class Roster
                  if (Report_Menu.jrbRoster.isSelected()){
                      String c_number = Report_Menu.jtfClassNumber.getText();
                      query = ("Select course_name, course_start_date, fname, lname from program, registration, students where program.course_num = '"+c_number+"' and registration.student_id = students.student_id;");
                  //Squad list and counts
                  if (Report_Menu.jrbSquadCount.isSelected()){
                      query = ("SELECT Squad_Name, count(student_id) from students group by Squad_Name");
                  //Student List
                  if (Report_Menu.jrbStudent_list.isSelected()){
                      String Choose_month = (String) Report_Menu.jcbcourse_month.getSelectedItem();
                      String Choose_Course = (String) Report_Menu.jcbcourse_name.getSelectedItem();
                      query = ("select count(student_id) from (registration, program) where program .course_name = '"+Choose_Course+"' and substring(course_start_date, 6,2) = '"+Choose_month+"'and registration.course_num = program.course_num;");
                ps = conn.createStatement();
                //Run Selected Report
                ps.execute(query);
                rs = ps.executeQuery(query);
                ResultSetMetaData md = rs.getMetaData();
                int columns = md.getColumnCount();
                //  Get column names
                for (int i = 1; i <= columns; i++)
                    columnNames.addElement( md.getColumnName(i) );
                //  Get row data
                while (rs.next())
                    Vector row = new Vector(columns);
                    for (int i = 1; i <= columns; i++)
                        row.addElement( rs.getObject(i) );
                    //add row data to JTable
                    data.addElement( row );
                rs.close();
                ps.close();
            catch(Exception e)
                JOptionPane.showMessageDialog(null,e.getMessage());
            //  Create Jtable with database data 
            Container c = getContentPane();
            c.setLayout(new BorderLayout());
            Reporttable = new JTable(data, columnNames);
            JScrollPane scrollPane = new JScrollPane( Reporttable );
            c.add( scrollPane );
            JPanel buttonPanel = new JPanel();
            buttonPanel.setLayout(new FlowLayout(FlowLayout.RIGHT));
            buttonPanel.add(jbtprint);
            c.add(buttonPanel,BorderLayout.SOUTH);
            jbtprint.addActionListener(this);
        public void actionPerformed(ActionEvent e){
             if(e.getActionCommand().equals("Print Report")){
               PrintForm();
    public void PrintForm(){ 
         try {
             String name = null;
             // Will display correct heading for print job
             if (Report_Menu.jrbMaster_list.isSelected()){
             name = "Master List";
             if (Report_Menu.jrbBirthday.isSelected()){
             name = "Birthday List";
             if (Report_Menu.jrbClass_taken.isSelected()){
             name = "Classes taken by Student";
             if (Report_Menu.jrbCourseCatologue.isSelected()){
             name = "Course Catalogue";
             if (Report_Menu.jrbExpiration.isSelected()){
             name = "Certification Expiration Report";
             if (Report_Menu.jrbRoster.isSelected()){
             name = "Class Roster";
             if (Report_Menu.jrbSquadCount.isSelected()){
             name = "Squad list with Student Counts";
             if (Report_Menu.jrbStudent_list.isSelected()){
             name = "Student count by Course";
             // fetch the printable
             Printable printable = Reporttable.getPrintable(JTable.PrintMode.FIT_WIDTH,
                                                      new MessageFormat(name),
                                                      new MessageFormat("Page - {0}"));
             // fetch a PrinterJob
             PrinterJob job = PrinterJob.getPrinterJob();
             // set the Printable on the PrinterJob
             job.setPrintable(printable);
             // create an attribute set to store attributes from the print dialog
             PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();
             // display a print dialog and record whether or not the user cancels it
             boolean printAccepted = job.printDialog(attr);
             // if the user didn't cancel the dialog
             if (printAccepted) {
                    try {
                          // do the printing (may need to handle PrinterException)
                        job.print(attr);
                    } catch (PrinterException ex) {
                        ex.printStackTrace();
         } finally {
             // restore the original table state here (for example, restore selection)
    }

  • Getting at POST data from a pl/sql procedure through Path Aliasing

    Hi.
    I have mod_plsql configured with "path alias" and "path alias procedure" so that the request ends up in my
    procedure and i have the remaining path in p_path. This is what I want.
    http://<domain>/<dad>/<myalias>/<p_path>
    My question is; is there a way at this point to get at POST data in the request? I haven't been able to find
    any way of doing this looking through the documentation. Is the body of the request lost at the gateway
    (mod_plsql) using path alias?
    If so, is there some other way to achieve something like !myproc(name_array [somearr], value_arr [somearr])
    where the first entry in the arrays is an eqvivalent to p_path?

    Billy  Verreynne  wrote:
    Øyle wrote:
    I have mod_plsql configured with "path alias" and "path alias procedure" so that the request ends up in my
    procedure and i have the remaining path in p_path. This is what I want.
    http://<domain>/<dad>/<myalias>/<p_path>
    My question is; is there a way at this point to get at POST data in the request? Do not understand the question as a POST and GET are simply two different methods that a web browser submits a URL and data. There is no "+path+" involved here.Thank you for answering. I think the confusion is because you disregard what I said about "path alias" and "path alias procedure".
    Those are configuration of the mod_plsql gateway so that any URI containing <myalias> above is directed to the procedure stated
    by "path alias procedure". The gateway also sends any remaining parts of the URI to this procedure as an varchar2 argument (p_path).
    My problem is that I see no way to get at any POST data as the signature of this procedure has to be this one varchar2, and I don't
    know any other way to get at the body of the request.
    >
    If so, is there some other way to achieve something like !myproc(name_array [somearr], value_arr [somearr])
    where the first entry in the arrays is an eqvivalent to p_path?If you want to know what the URL is, the full path used, then you need to look at the CGI (Command Gateway Interface) environment. The web server builds a list of CGI variables. These include the type of web server, the URL, the type of HTTP command (GET or POST), and so on.
    Within your PL/SQL web procedure, you can query these CGI variables. Have a look at the function OWA_UTIL.GET_CGI_ENV in the [Oracle® Database PL/SQL Packages and Types Reference|http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/w_util.htm#i997269] guide.
    Take a look at CGI variables such as PATH_INFO, PATH_TRANSLATED, SCRIPT_NAME and so on.Yes, thank you, but my problem is a bit upside down. I do use the cgi environment to get the method and I have path as input, what I can't
    find is the body of the request. I might be approaching this entirely the wrong way. It might be a bit easyer to understand if I state that I'm
    trying to find a way to implement a RESTfull service in pl/sql.

  • I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't

    I have been a loyal customer for years and have a hot spot because internet options are very limited in our rural area.  I have stayed with 10G since the beginning.  Most months I don't use the 10G.  Verizon has no problem with me paying for Data I don't use.  This month my daughter comes home from College and she accidentally uses 24G.....14 over get blind sided with $140.00 in overages.  I called Verizon today......stopped in to the store today......My neighbor told me they waved charges for her one time.  Lots of charges.....But I'm am getting no help.  Not even an offer of a payment plan to help me out.  I went back just 6 months and I have over paid for 19G.....Seems like they would like to help out their loyal customers!!!!     Does anybody have any suggestions on how to deal with them?   We are not wealthy....or I would just pay this and walk away......

    There is a big misconception in what customers believe a cell carrier is obligated to do.
    You pay a set price to use up to that amount of xx data. It makes no difference if you use it to the paid limit or way under. Its like peace of mind when you don't have to worry about a data counter.
    Your daughter used the data, your plan is quite clear of what overage charges are. Why should or would Verizon wireless just forgive the charges because you are a customer? Your daughter used the data, get the money from her. That is the responsible thing to do.
    There is no "I have been a loyal customer so please remove the $120, or $250, or $2,000.00 since I did not mean to use it"
    Your electric company, or gas company or any other company does not remove valid charges. Why should Verizon wireless?
    Just pay the invoice and don't think you are being mistreated because Verizon is a business and not a charity.
    Good Luck

  • Problems Receiving Emails and some data on WIFI since latest software update.

    Problems Receiving Emails and some data on WIFI since latest software update. 
    My blackberry torch will not receive emails on wifi since the latest software update, I've tried numerous wifi networks and several handsets, even had them replaced and received a brand new. Still the same problem. 
    When turning off the wifi network on the torch, the phone will stall for 5-10min while it tries to communicate with the network (vodafone) to receive outstanding emails and data. 
    Can someone please inform Blackberry and get a quick fix on this

    Sounds like you have Do NOt Disturb turned on.
    settings - do not disturb - off

  • Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it acr

    Hi, I have a problem with getting my apple Id working for me. It's been 2 months since it happened and Apple failed to act. I can tell my story proerly, but am not sure, you guys can help, so I just copy my message to them today, I am trying to get it across all the places around to pay their attention. This is a desperate move, so if you are not the right people to help me to get my message accross, may be you can advise where can I go.
    Thank you, and sorry for the language.
    Vitas Dijokas
    I am sorry to say that, but your security makes my life miserable – it’s been 2 months since my Apple ID account got stuck, and since then I cannot update 37 applications (to date), i.e. most of my applications. Half of them I bought. I also paid for iCloud, and it is not working. I paid money and I am stuck with old applications and no iCloud. Your security *****. Your service ***** too. It took your service 1 month to finally understand why this happened to me, and it took me tens of emails to you and 3 hours of telephone conversation to find out the reason for my problem. And the problem is still not fixed. NOT FIXED. You just leave your customer – the one who paid you money and spent so much time with you trying to help you help me – and nothing. You tell me:  “Vitas, Stick your stinky iphone in your *** and enjoy life, we do not care!” *************.
    It is ******* outrageous, and you should know that,  guys. Get into the ******* database and correct the bug. Get someone in the partners-telephone carriers company (it is Orange as carreer and Cellcom as seller of the phone)  authorized to Identify me in personal encounter in one of the branches in Israel (where I live) and make sure it is really me, and get the ******* system accept my password and let me use my phone.
    Otherwise **** off. None of my friends will get my advise to buy an iphone or any of apple products. And I think you should be very attentive to cases like this, guys. Do your work for the money we pay, or disappear. There are many others eager to take your place, and if the problem is not fixed I will eventually go to the others. My patience is lost, and as soon as I can afford another phone I will change it. AND I WILL TRY TO GIVE BAAAAAD PUBLICITY TO APPLE – I am threatening here, so ACT NOW.
    Vitas Dijokas

    Well, it seems waiting is not my strong suit..! I renamed a javascript file called recovery to sessionstore. This file was in the folder sessionstore-backups I had copied from mozilla 3 days ago, when my tabs were still in place. I replaced the sessionstore in mozilla's default folder with the renamed file and then started mozilla. And the tabs reappeared as they were 3 days ago!
    So there goes the tab problem. But again when I started mozilla the window saying "a script has stopped responding" appeared, this time the script being: chrome//browser/contenttabbrowser.xml2542
    If someone knows how to fix this and make firefox launch normally, please reply! Thank you

  • How to Get the Current data into Planning Layout from the Planning cube

    Hi,
    I have a problem in BPS.   I am selecting the data from cube based on Month org details but I want to see the latest data.   How can i get this data into planning cube.
    Like
    data
    Tran           cal month            org               amt
    1                 jan                        a                  100
    1                 feb                        a                   200
    if i want to read based on Tran org as input values I shoud get the below data but I am getting the previous data.   
    Tran           cal month            org               amt
    1                 feb                        a                   200
    Kindly help me in this regard
    Thanks
    Naveen

    Naveen,
        Are yo having issue when you save something in the layout, the data doesn't appear in the listcube ? Or do you have issue that the latest data you see in the cube doesn't appear in the layout ?
    For the former issue, please look at your selections of listcube and for the second issue, please check your planning level definition, make sure all the restrictions you have applied are valid for this latest data to be presented in the layout.
    Hope this helps.
    Cheers
    Srini

  • Got locked out of iPhone 4 my only option was to upgrade so I got iphone 5s but when I restore from backup that's recent from iCloud I don't get my game data and app data how do I get all my data back for games and apps?

    I still have old phone is there a way to bypass 4 digit code my kid created it and locked me out but it's disabled says connect to iTunes but no access to computer just wifi. I have all my data still on it there's gotta be a way to over ride it or something far situations like this cause someone said iCloud don't save everything like app info just basic app info PLEASE IF ANYONE CAN HELP OUT???
    I'd like my phone to have all data it had when I backed up to iCloud bought extra space and everything and still didn't get all my data from other phone and I made sure everything was checked on to be backed up

    Thanks so much Meg. Unfortunately, iTunes is the program I use to perform syncing. I don't really have other outside options. It is also the location of the backup I would use to restore my phone, and my only way to reclaim important data. I am concerned that, since the last backup occurred when the "other" bar was only moderately huge (around 29G I think), that a backup would replicate the problem back onto my phone. 
    My contacts, etc. are all in address book and the calendar app on my Mac.  As far as I know, iTunes is the way to get them back, but iTunes is where the problem is. 
    Any thoughts on this?

Maybe you are looking for

  • How to make sub folders in a share invisible to certain users?

    Back in the 10.3 days simply setting the posix permissions so that certain users and groups had no access to a sub folder in a shared folder would make the folder invisible to those users and groups. Flash forward to Snow Leopard, I'm trying to accom

  • Illustrator 10 - "the encoding (CMap) specified by a font is missing"

    Ni hao, I'm trying to design a brochure in Illustrator 10 using Chinese characters. I'm running Leopard 10.5.8 on a PowerPC G4. I have my Chinese text in a Word document in the 'Hei' font. I am able to successfully copy and paste the Chinese text int

  • Exluce app from Parallels?

    I'm in the process of setting up a new Mac mini. While I want to 'migrate' most of my current apps from my MacBook, I want to exclude Parallels from the process. Any advice how to to do this would be appreciated.

  • Issue of Non Valuated Material

    Hi Friends, We have non valuated stockable material UNBW. We made material master, PO along with cost centre accordingly did GR. Value booked to consumption account & stock get updated. The material is issued to dept. / cost centre. How to do this in

  • SOAP over JMS sample BPEL Process

    Hi , Does any one has the sample BPEL Process code for SOAP/JMS protocol bindings on Oracle Weblogic server ? This is very urgent , any help is appreciated ! Regards, Sam