Allow the user to select output options
Rather than tell the user what format the report output will be, have your program ask the user to select the output option.
The OrderReportJava demo program presents a form that allows the user to make the choice regarding the output.
![Screen shot of the OrderReportJava application user interface.](Images/order_report_java_demo_ui.jpg)
To view the code that creates this interface and uses the user's selection to set the output options, examine the file OrderReportJava.java. See The OrderReportJava demo.