shudlearn Posted July 8, 2008 Share Posted July 8, 2008 Hi, Is there any way I can save my csv report to any file location through a save dialog box? Roshan Link to comment Share on other sites More sharing options...
szaboaz Posted July 8, 2008 Share Posted July 8, 2008 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,ArpadPost edited by: szaboaz, at: 2008/07/08 12:49 Link to comment Share on other sites More sharing options...
shudlearn Posted July 9, 2008 Author Share Posted July 9, 2008 Thanx a lot..Will use them Roshan 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