Jasper Reports — those empty reports.

Jasper reports is a wonderful product .. and it does integrate really nicely with netbeans. But when it goes wrong you can get blank reports with no clue to what the problem is.

Here are some short observations when coding it up with java and JSF that might help you.

1. Watch your field names – I noticed that when you generated reports Jasper Reports writes a pretty odd query especially with SQL server 2000 at the back end (yes I know, some people still use it, although this one WILL be upgraded to MYSQL):-

     tblZones.”ZoneDescription” AS tblZones_ZoneDescription
     “dbo”.”tblZones” tblZones

Now this is fine – so then the fields in the report are mapped to tblZones_ZoneDescription intead of just leaving it as is – so if you then have a custom query for the report make sure that you are using the right field names or you could get that “blank page thing”

2. Main/Subforms or header/details (you know, Purchase Order Header and lines) – getting sub forms to work is hard graft! – I will post a solution when we do it – but until then it’s easier to have a SINGLE query with a join have the lines in the detail and group by the header id.

3. When it all goes wrong – sometimes I’ve had it refusing to run the jasper reports report I created earlier in good Blue Peter fashion. Normally a restart of NetBeans does fix this – but sometimes I’ve found a CHKDSK.

4. BACK IT UP – EVERYONE who develops should use a repository system such as subversion or CVS it’s saved my life countless times.

Have fun!


About Paul C

I am a Senior Java programmer/Web Technologies, Play in a band called Mandolin Monday, I have a cat and I live on a boat.

Posted on August 26, 2008, in Netbeans and tagged , . Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: