mulcamd Posted April 28, 2012 Share Posted April 28, 2012 From a scriptlet I want to show a message to the user and upon Ok quit the report.Questions: How can I show a message to the user? BTW In the Server I see under View -> Samples that there are several message boxes like "#standardConfirm". How can I use or address them? What should I call in my scriptlet to stop the report.Google had no answer, hopefully you have!iReportIn the iReport-Ultimate-Guide-4 on page 336 is an example of an Swing JOptionPane popup. Is this possible in JasperReports Server?When issueing the command below I get the error:JOptionPane.showMessageDialog(null, "Popup warning message.", "Warning", JOptionPane.WARNING_MESSAGE); Error Messagejava.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. Error Tracejava.awt.HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it. at java.awt.GraphicsEnvironment.checkHeadless(GraphicsEnvironment.java:159) at java.awt.Window.<init>(Window.java:432) at java.awt.Frame.<init>(Frame.java:403) at java.awt.Frame.<init>(Frame.java:368) at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1733) at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1810) at javax.swing.JOptionPane.getRootFrame(JOptionPane.java:1673) at javax.swing.JOptionPane.showOptionDialog(JOptionPane.java:846) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:650) at javax.swing.JOptionPane.showMessageDialog(JOptionPane.java:621) at Code: Post Edited by mulcamd at 04/28/2012 13:11 Link to comment Share on other sites More sharing options...
mulcamd Posted May 14, 2012 Author Share Posted May 14, 2012 How to show a message to the user? 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