Java

Jasper Reports Step by Step in Java Netbeans

In this tutorial will teach how to make the Jasper Report Step by Step those who wants to become a Java Developer reporting is a must. This tutorial will teach every thing about that.How to design the Jasper Report and make the Jdbc database Connectivity. I attached the code along with practical video.

Paste the code inside the Report Button

       try 
        {
          Class.forName("com.mysql.jdbc.Driver");
          String query = "select * from records";
            
          JRDesignQuery updateQuery = new JRDesignQuery();
          updateQuery.setText(query);
            
          jdesign.setQuery(updateQuery);
            
          JasperReport jreport = JasperCompileManager.compileReport(jdesign);
          JasperPrint jprint = JasperFillManager.fillReport(jreport, null,con);
            
          JasperViewer.viewReport(jprint);
           
            
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(report.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(report.class.getName()).log(Level.SEVERE, null, ex);
        } catch (JRException ex) {
            Logger.getLogger(report.class.getName()).log(Level.SEVERE, null, ex);
        }     con = DriverManager.getConnection("jdbc:mysql://localhost/jsperstudent","root","");
            JasperDesign jdesign = JRXmlLoader.load("C:\\Users\\kobinath\\Documents\\NetBeansProjects\\jsperstudent\\src\\studentreport\\report1.jrxml");
            String query = "select * from records";
            
            JRDesignQuery updateQuery = new JRDesignQuery();
            updateQuery.setText(query);
            
            jdesign.setQuery(updateQuery);
            
            JasperReport jreport = JasperCompileManager.compileReport(jdesign);
            JasperPrint jprint = JasperFillManager.fillReport(jreport, null,con);
            
           JasperViewer.viewReport(jprint);
           
            
        } catch (ClassNotFoundException ex) {
            Logger.getLogger(report.class.getName()).log(Level.SEVERE, null, ex);
        } catch (SQLException ex) {
            Logger.getLogger(report.class.getName()).log(Level.SEVERE, null, ex);
        } catch (JRException ex) {
            Logger.getLogger(report.class.getName()).log(Level.SEVERE, null, ex);
}

i have attached the video link below. which will do this tutorials step by step

 

admin

Recent Posts

Java Payroll System Calculate Employee Overtime

Act as a Java developer to create a program that calculates the gross wage for…

2 days ago

Employee Working Hours Calculation System using Java

Initialize the employee number, Hourswork,and Hoursrate to calculate a grosswage use the following condition. if…

3 days ago

Laravel 11 School Management System

In this tutorial, we will teach you how to create a simple school management system…

1 week ago

How to Make Admin Panel Using React MUI

I have design the Admin Basic templete using React MUI Design Admin Dashboard and Login.Here…

3 weeks ago

Install Laravel Breeze for Authentication Using Laravel 11

In this tutorial ,i am to going teach the Laravel Breeze.Laravel Breeze provides a simple…

3 weeks ago

Point of Sales (POS) System Documentation

this tutorial we will discuss about how to make the point of sales system step…

1 month ago