Menu ▾ ▴

#2 NPE when resigning ReportViewer with zoom mode set

open
nobody
None
5
2010-10-18
2010-10-18
No

Embed ReportViewer in composite within resizable dialog.
Set the jasperPrint (document variable within ReportViewer)
Set the ZoomMode to something other than ZOOM_MODE_NONE.

Unset the document on the reportViewer. Now resize the dialog.

The resize listener gets kicked off and the NullPointerException gets thrown in the computeZoom method when the document is referenced for pageWidth.

Workaround:
Set the Zoom mode to ZOOM_MODE_NONE before unsetting the document.

Nice to not have to do this to make the code a bit more robust.

Discussion

  • Peter Severin

    Peter Severin - 2010-10-18

    Craig, thanks for reporting this. Can you attach a stacktrace?

     
  • craig hewetson

    craig hewetson - 2010-10-18

    Stacktrace

     

Log in to post a comment.