Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/04/2013, 22:32
Geovanny0401
 
Fecha de Ingreso: diciembre-2009
Mensajes: 137
Antigüedad: 16 años, 9 meses
Puntos: 4
Respuesta: Problema con JasperReport

Hola nuevamente volverte a molestar ahora me sale otro error
Código PHP:
Error: net.sf.jasperreports.engine.JRException: Invalid byte 1 of 1-byte UTF-8 sequence. 
te coloco el codigo

Código PHP:
public class IniciarReporte {
        public static final 
String DRIVER="com.mysql.jdbc.Driver";
        public static final 
String RUTA="jdbc:mysql://localhost/Factura";
        public static final 
String USER="root";
        public static final 
String PASSWORD="root";
    public static 
Connection CONEXION;
public 
void EjecutarReporte(String Factura)
    {
     
     try
    {
            Class.
forName(DRIVER);
            
CONEXION = DriverManager.getConnection(RUTA,USER,PASSWORD);
          
javax.swing.JOptionPane.showMessageDialog(null,"Conexion establecida");

                     
String master = System.getProperty("user.dir") + "/src/Reporte/ReporteFactura.jasper";
          if (
master == null) {
            
JOptionPane.showMessageDialog(null, "No se encuentra el archivo maestro", "ERROR REPORTE", JOptionPane.ERROR_MESSAGE);
            return;
            }
            
JasperReport masterReport = null;
 try {
     
masterReport = JasperCompileManager.compileReport(master);
 
//masterReport = (JasperReport) JRLoader.loadObject(master);
  
} catch (Exception jre) {
 
JOptionPane.showMessageDialog(null, "Problema al cargar archivo maestro", "ERROR REPORTE", JOptionPane.ERROR_MESSAGE);
 
System.out.println("Error: " + jre);
 return;
 }
            
Map parametro = new HashMap();
            
parametro.put("NUM_FACTURA", Factura);
            
JasperPrint jasperPrint = JasperFillManager.fillReport(masterReport, parametro, CONEXION);
            
JasperViewer jviewer = new JasperViewer(jasperPrint, false);

          
          

    }
    catch(
Exception j)
    {
           
JOptionPane.showMessageDialog(null, "Problemas al generar el reporte. \n Detalles: " + j);
           
Logger.getLogger(IniciarReporte.class.getName()).log(Level.SEVERE, null, j);
    }
}
}