Click here to Skip to main content
15,883,749 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Java
import java.util.regex.*;
import java.sql.*;
    
public class Telecom {

    public Telecom(){
            connect();
                                        }
    public void connect(){
        try{
                       
          Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
          String db= "jdbc:odbc:Driver={Microsoft Access Driver " + "(*.mdb, *.accdb)};DBQ=D:\\TelecomeDatabase.mdb";
 
          Connection con = DriverManager.getConnection(db);
          Statement st = con.createStatement();
          String sql = "select * from CustomerInfo";
          ResultSet rs = st.executeQuery(sql);
          
    
                    while (rs.next())
                    {
                            
    String record = rs.getString("RecordNo");
    String file = rs.getString("FileNo");
    String Deposit = rs.getString("Deposite");
                            
// Deposit                                           
                                                    
                            String pattern1="UiRCcOs74Q3oiro9v6oSfw==";
                            String pattern2="0iMNFDYVBEEO3GpeehM2CA==";
                            
         boolean patternMatched1 = Pattern.matches(pattern1, Deposit);	
         boolean patternMatched2 = Pattern.matches(pattern2, Deposit);
                            
                            if(!(patternMatched1||patternMatched2))
                            {
                                   
                            System.out.println(file+ "..."+record+"...Deposit");
                            }
                            
// Balance                            
                            
                            String Balance = rs.getString("Balance");
                            
                            String pattern3="DFRnh7oBC9LDv0C92bHbGg==";
                            String pattern4="PncOzpz3N\\+RmEODQoQGPxg==";
                            
        boolean patternMatched3 = Pattern.matches(pattern3, Balance);	
        boolean patternMatched4 = Pattern.matches(pattern4, Balance);
                            
                            if(!(patternMatched3||patternMatched4))
                            {
                                   
                            System.out.println(file+ "..."+record+"...Balance");
                            }
                            
                            String CreditRate = rs.getString("CreditRate");
                            
                            String pattern5="OiTWdthYeBQoIuEWrqPCtg==";
                            String pattern6="kuYahrq16NK1HikHf\\+YuMg==";
                            String pattern7="tmpM9sJUbcf08DoWzE2ldA==";
                            String pattern8="ieWCqWGkCXeaudyQDzgYGA==";
                            
        boolean patternMatched5 = Pattern.matches(pattern5, CreditRate);	
        boolean patternMatched6 = Pattern.matches(pattern6, CreditRate);
        boolean patternMatched7 = Pattern.matches(pattern7, CreditRate);	
        boolean patternMatched8 = Pattern.matches(pattern8, CreditRate);
                            
                            if(!(patternMatched5||patternMatched6||patternMatched7||patternMatched8))
                            {
                                System.out.println(file+ "..."+record+"...Credit Rate");
                            }
                           
 }
                
} catch(Exception ex){
      
  }
          }
    
    
    
    public static void main(String[] args) {
                
        new Telecom();
        
    }
}
Posted
Updated 4-Jan-13 19:59pm
v2
Comments
Sandeep Mewara 5-Jan-13 1:59am    
You ask for report generation and put a code dump... can be little specific?
alexpandy1 5-Jan-13 2:06am    
Hi i need the URL to type while generating ireport using NETBeans but its showing error always for the CONNECTION URL is wrong

1 solution

You did not solve your real problem[^] - please go for that first.
It does't get better when you ignore it.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900