0
votes

I'm creating a report, basically for my project using Netbeans IDE 8.2, JasperReport 6.0.0 and iReport 5.6.0 (actually tried the JasperReport 6.2.0, but unluckily same results occur).

I can preview the result, but unfortunately whenever I tried to save the .jrxml file. I've got an error called java.lang.NullPointerException

I've searched for a solution from the internet and tried every solution I thought would help, but I still ended posting here.

Here is the stack trace.

java.lang.NullPointerException at com.jaspersoft.ireport.designer.JrxmlEditorSupport$3.run(JrxmlEditorSupport.java:267) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:159) [catch] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I expect the output of user input and its data from SQL Server Database.

2
This is an error inside ireport correct?Petter Friberg
@kleopatra that will probably be difficult, seems like a problem in the ireport installation.Petter Friberg
@PetterFriberg difficult or not, that's what needs to be done :)kleopatra

2 Answers

1
votes

This is a bug in iReport see bug report.

User kizinfo found this work around.

after previewing (which saves the report successfully) just close and reopen the document before making any additional changes (so you can save it).

but

iReport is the old IDE it's supported in maintenance-only mode ended December 31, 2015, probably you are better of switching to the latest IDE JasperSoft Studio

1
votes

Thanks for the help guys, but after reading so many errors alike from another forum, I figure out how to make this work.

First I change the Filter Expression value in the Reports property to new Boolean(true) and the value of When No Data to All Sections, No Detail I don't know how and why it has to do with the Filter Expression, but YES it works fine right now 😅. I can pass values to its parameters.