jasper report printing problem
-
guys man netbeans ekata jasper librarys tika add karala button event ekata code kara print wene report ekak, eth program eka run karala button eka press karama error ekak ewaa, youtube tutorials uth baluwa ungem oya steps tika karadi wada, mage man hithane podi case ekak thyiane, katada puluwan help karana, big help :pick:
-
Error ekai ekai methana post karanna
-
oyage full error eka add karana post ekata podk
-
bros , library ekak thibila add kara. dan errors mokuth penan na habai print weneath na mokuth
-
@ChrisSachintha oyage full code eka balanne nathuwa mukuth kiyanna ba bro
-
Class.forName("com.mysql.jdbc.Driver");
con = DriverManager.getConnection("jdbc:mysql://localhost:3306/photocopy","root","");JasperDesign jdesign = JRXmlLoader.load("C:\\Users\\PCLand\\Documents\\NetBeansProject\\JavaApplication29\\src\\helo\\report1.jrxml"); String sql = "select * from copyprices"; JRDesignQuery updatequery = new JRDesignQuery(); updatequery.setText(sql); jdesign.setQuery(updatequery); JasperReport jreport = JasperCompileManager.compileReport(jdesign); JasperPrint jprint = JasperFillManager.fillReport(jreport, null,con); JasperViewer.viewReport(jprint);
}
-
aya wena mokuth na , jframe ekak haduwa button ekak dama oka liwa
-
machan me .jrxml file eka load karana eka try catch ekak athulata danna
me example eke widiyata
https://www.programcreek.com/java-api-examples/?api=net.sf.jasperreports.engine.design.JasperDesign
-
@root adoo hadagatha bn, mechara wela aula thibila thiyane, man hadapu report template eka bn cherry.jpg kiyala image ekak thiba.. kohma hari eka load wen nathi case ekak thibila thiyane, hiyoo sallii wada wada wdada
udaw karapu hamotama thanks
adarei adarei adarei
dukai.............................
-
Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/photocopy","root",""); String reportpath = "C:\\Users\\PCLand\\Documents\\NetBeansProject\\JavaApplication29\\src\\helo\\report1.jrxml"; JasperReport jr = JasperCompileManager.compileReport(reportpath); JasperPrint jprint = JasperFillManager.fillReport(jr, null,con); JasperViewer.viewReport(jprint); con.close();
mena code eka, mata wagema aul giyoth meka reffer karana
-
@ChrisSachintha
ayyo salli hema welema external files ekka load karaddi try catch ekak athule load karanna , ethakota oyata errors catch karanna puluwan
-
@root mewa hoda padam :pizza: