JasperReport new user. Need help please reply

I used the tutorial given on the page http://jasperforge.org//website/ireportwebsite/IR%20Website/ir_deploying_reports.html?header=project&target=ireport to deploy my report created using iReport (latest version) on java and included all the jars given on the page using one the project libraries. But I am getting the error

The java class is not found:  net.sf.jasperreports.engine.JRDataSource

 

I am using websphere 6.0 in RAD v7. I have kept all the jar files in Web-INF folder.

Please help me.

 

Thanks in advance :)

Code:
import net.sf.jasperreports.engine.*;
import net.sf.jasperreports.engine.export.*;
import java.util.*;
 
public class JasperTest {
 
    public static void main(String[] args) {
        String fileName = "C:/jrxml/report1.jasper";
        String outFileName = "C:/report1.pdf";
        HashMap hm = new HashMap();
        try {
            // Fill the report using an empty data source
            JasperPrint print = JasperFillManager.fillReport(fileName, hm, new JREmptyDataSource());
 
            // Create a PDF exporter
            JRExporter exporter = new JRPdfExporter();
 
            // Configure the exporter (set output file name and print object)
            exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, outFileName);
            exporter.setParameter(JRExporterParameter.JASPER_PRINT, print);
 
            // Export the PDF file
            exporter.exportReport();
 
        } catch (JRException e) {
            e.printStackTrace();
            System.exit(1);
        } catch (Exception e) {
            e.printStackTrace();
            System.exit(1);
        }
    }
}</td></tr></tbody></table>
chetan1989's picture
Joined: Jan 23 2010 - 9:53am
Last seen: 13 years 8 months ago

0 Answers:

No answers yet
Feedback