Jump to content
We've recently updated our Privacy Statement, available here ×

shudlearn

Recommended Posts

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

You can pop up a JFileChooser, and it will give back a File. If you assign it to a reference named destFile, you can say:

 

Code:
exporter.setParameter(JRExporterParameter.OUTPUT_FILE_NAME, destFile.toString());

 

And after that, you can call

Code:
[code]exporter.exportReport();

 

 

If you want to pop up the JFileChooser AFTER you did the export, then instead of JRExporterParameter.OUTPUT_FILE_NAME, set any of these:

 

JRExporterParameter.OUTPUT_STRING_BUFFER, JRExporterParameter.OUTPUT_WRITER, JRExporterParameter.OUTPUT_STREAM

 

With the appropriate result object as a parameter value. The exporter will put the result in that, you pop up the JFileChooser, get the File, and write the thing into it.

 

HTH,

Arpad

Post edited by: szaboaz, at: 2008/07/08 12:49

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...