[ kosovic @ 02.12.2016. 09:54 ] @
Imam veliki problem, naime radim neki program u okruženju Jdeveloper-a sa ADF framework-om, ne znam kako da pozovem Jasper report iz aplikacije na događaj klik button. Primjer koji radi je iz Jave public static void main i on izvrši otvaranje reporta kako treba ali kako to implementirati u aplikaciju? public static void main(String [ ] args) { Connection connection = null; Statement statement = null; try { connection = Database.getConnection(); statement = connection.createStatement(); HashMap parameterMap = new HashMap(); parameterMap.put("rtitle", "Report Title Here");//sending the report title as a parameter. Report rpt = new Report(parameterMap, connection); rpt.setReportName("productlist"); //productlist is the name of my jasper file. rpt.callReport(); } catch (Exception e) { e.printStackTrace(); } finally { try { statement.close(); connection.close(); } catch (Exception e) { e.printStackTrace(); } } } |