Código:
  
 coloco el codigo para que lo mirenel documento no tiene pagina
Código PHP:
   try {
            con = Conexion.getConnection();
            String codigo = txtAfiliado.getText();
            try {
                JasperReport reporte = (JasperReport) JRLoader.loadObject("src/Reporte.jasper");
                Map parametro = new HashMap();
                parametro.put("COD_AFILIACION", codigo);
                JasperPrint jasperPrint = JasperFillManager.fillReport(reporte, parametro, con);
                JasperViewer jviewer = new JasperViewer(jasperPrint, false);
                jviewer.setTitle("GMMG - Reporte");
                jviewer.setVisible(true);
            } catch (JRException ex) {
                ex.printStackTrace();
            }
        } catch (SQLException ex) {
            Logger.getLogger(Reporte.class.getName()).log(Level.SEVERE, null, ex);
        } finally {
            Conexion.close(con);
        } 
     
 


