NPE when resigning ReportViewer with zoom mode set
Brought to you by:
peter_p_s
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.
Craig, thanks for reporting this. Can you attach a stacktrace?
Stacktrace