mikij Posted November 21, 2008 Share Posted November 21, 2008 Hi,I'm trying to implement JasperReports in my Web application (Struts 2-based). But, when report is shown I get just an empty page for a report! I don't get any errors or warnings in console. This is the code which I use for calling the report:I first fill parameters:Map params = new HashMap();params.put("param1", new Long(1L));...and then call the report:Class.forName(new String("com.mysql.jdbc.Driver"));Connection conn= DriverManager.getConnection(new String("jdbc:mysql://localhost/myApplication"), new String("root"), new String(""));jasperPrint = JasperFillManager.fillReport(jasperReport, params, conn);My Connection object is not null! What is the problem here ? --Thx, Miki Link to comment Share on other sites More sharing options...
mikij Posted November 21, 2008 Author Share Posted November 21, 2008 Actually, my report was empty because there was no data returned from SQL query. Sorry. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now