Lanka Developers Community

    Lanka Developers

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Shop

    jasper report printing problem

    Programming
    netbeans java jasper help
    3
    12
    1097
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • KrissSachintha
      KrissSachintha last edited by

      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:

      sccene eka.PNG

      1 Reply Last reply Reply Quote 1
      • root
        root Linux Help last edited by

        Error ekai ekai methana post karanna

        1 Reply Last reply Reply Quote 0
        • Kalana
          Kalana last edited by

          oyage full error eka add karana post ekata podk

          1 Reply Last reply Reply Quote 0
          • KrissSachintha
            KrissSachintha last edited by

            bros , library ekak thibila add kara. dan errors mokuth penan na habai print weneath na mokuth

            root 1 Reply Last reply Reply Quote 0
            • root
              root Linux Help @KrissSachintha last edited by

              @ChrisSachintha oyage full code eka balanne nathuwa mukuth kiyanna ba bro

              KrissSachintha 1 Reply Last reply Reply Quote 0
              • KrissSachintha
                KrissSachintha @root last edited by

                @root

                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);
                

                }

                1 Reply Last reply Reply Quote 0
                • KrissSachintha
                  KrissSachintha last edited by

                  aya wena mokuth na , jframe ekak haduwa button ekak dama oka liwa

                  1 Reply Last reply Reply Quote 0
                  • root
                    root Linux Help last edited by

                    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

                    KrissSachintha 1 Reply Last reply Reply Quote 0
                    • KrissSachintha
                      KrissSachintha @root last edited by

                      @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.............................

                      root 1 Reply Last reply Reply Quote 1
                      • KrissSachintha
                        KrissSachintha last edited by

                          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

                        1 Reply Last reply Reply Quote 0
                        • root
                          root Linux Help @KrissSachintha last edited by

                          @ChrisSachintha

                          ayyo salli hema welema external files ekka load karaddi try catch ekak athule load karanna , ethakota oyata errors catch karanna puluwan

                          KrissSachintha 1 Reply Last reply Reply Quote 2
                          • KrissSachintha
                            KrissSachintha @root last edited by

                            @root mewa hoda padam :pizza:

                            1 Reply Last reply Reply Quote 0
                            • 1 / 1
                            • First post
                              Last post

                            0
                            Online

                            3.6k
                            Users

                            1.3k
                            Topics

                            5.3k
                            Posts

                            • Privacy
                            • Terms & Conditions
                            • Donate

                            © Copyrights and All right reserved Lanka Developers Community

                            Powered by Axis Technologies (PVT) Ltd

                            Made with in Sri Lanka

                            | |