ragazzi questo e il codice che avete incollato. ma io ho problema a trovare le classi che importate esempio: import net.sf.jasperreports.engine.JasperCompileManager; ecc...
dove li posso trovare...????sono 6 classi...mi date un mano per favore...
codice:
package org.sportfantasy.jasperreport;

import java.sql.Connection;
import java.sql.DriverManager;

import net.sf.jasperreports.engine.JasperCompileManager;
import net.sf.jasperreports.engine.JasperExportManager;
import net.sf.jasperreports.engine.JasperFillManager;
import net.sf.jasperreports.engine.JasperPrint;
import net.sf.jasperreports.engine.design.JasperDesign;
import net.sf.jasperreports.engine.xml.JRXmlLoader;

public class TestJR
{
  public static String JASPER_REPORT_FOLDER   = "C:/TEMP/";
  public static String JASPER_FILENAME    = "studenti";
  public static String DRIVER       = "com.mysql.jdbc.Driver";
  public static String DB_URL       = "jdbc:mysql://localhost/jr";
  public static String DB_NAME       = "jr";
  public static String DB_USERNAME     = "pippi";
  public static String DB_PASSWORD     = "pluto";
  
  public static void main(String[] args) throws Exception
  {
    //caricamento file JRXML
    JasperDesign jasperDesign = JRXmlLoader.load(JASPER_REPORT_FOLDER + JASPER_FILENAME + ".jrxml");
    //compilazione del file e generazione del file JASPER
    JasperCompileManager.compileReportToFile(jasperDesign, JASPER_REPORT_FOLDER + JASPER_FILENAME + ".jasper");

    //inizializzazione connessione al database
    Class.forName(DRIVER);
    Connection conn = DriverManager.getConnection(DB_URL, DB_USERNAME, DB_PASSWORD);

    //rendering e generazione del file PDF
    JasperPrint jp = JasperFillManager.fillReport(JASPER_REPORT_FOLDER + JASPER_FILENAME + ".jasper", null, conn);
    JasperExportManager.exportReportToPdfFile(jp, JASPER_REPORT_FOLDER + "report.pdf");

  }
}