How to call a Jasperreport from a Java form
<p>I want to call a JasperReport that has two parameters by clicking a button on Java form, and I tried codes here below but they give errors.</p>

<pre><code>private void btnViewActionPerformed(java.awt.event.ActionEvent evt) {                                        
        java.sql.Date StartingDate = new java.sql.Date(JPrint
                                         .getSelectedDate()
                                         .getTimeInMillis());

        java.sql.Date EndingDate = new java.sql.Date(JPrint
                                               .getSelectedDate()
                                               .getTimeInMillis());
        reportView(StartingDate, EndingDate);
        this.setVisible(false);       
}

=========================================================
Error: Internal error; cannot instantiate Date(long) at java.sql.Date to()
</code></pre>
