edo_sia Posted April 4, 2015 Posted April 4, 2015 How to show iReport above JDialog. Because iReport always appear under JDialog because setModal (True).Can you help me without me must remove setModal (True) in JDialog?Here I attach coding to show iReport from JDialog:String nama = jComboBoxNamaPeneliti.getSelectedItem().toString(); String pilihan = "Pilih Nama Peneliti"; if(nama == null ? pilihan == null : nama.equals(pilihan)){ JOptionPane.showMessageDialog(this, "Pilih nama peneliti dulu"); }else{ try { File file = new File("src/laporan/LapPemakaianAlat.jrxml"); jasperDesign = JRXmlLoader.load(file); String kode =jLabelKodePeneliti.getText(); param.put("kode", kode); jasperReport = JasperCompileManager.compileReport(jasperDesign); jasperPrint = JasperFillManager.fillReport(jasperReport, param, koneksi = DatabaseUtil.getKoneksi()); JasperViewer.viewReport(jasperPrint, true); } catch (Exception e) { e.printStackTrace(); } }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now