Navigation

    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
    475
    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.
    • 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
                          • First post
                            Last post

                          1
                          Online

                          1.9k
                          Users

                          953
                          Topics

                          4.8k
                          Posts

                          • Privacy
                          • Terms & Conditions
                          • Donate
                          • Contact Us

                          © Copyrights and All right reserved Lanka Developers Community

                          Sponsored by Axis Technologies (PVT) Ltd

                          Made with in Sri Lanka

                          | |