/** * This class is an example of how ReportDriver class can be used in another class * @author Oguzhan Topsakal * @since 23 March 2006 * @see class ReportDriver */ public class DriveReportDriver { /** * Constructor for DriveReportDriver */ public DriveReportDriver() { } /** * Uses ReportDriver Class to connect to the database and to prepare and view the report. * @param args Takes 4 arguments as an input: databaseName, userName, password, reportFileLocation * args[0] holds database name, * args[1] holds user name * args[2] holds password to connect the database, * args[3] holds the location of the Jasper Report file (.jrxml) */ public static void main(String[] args) { if (args.length == 4) { String databaseName = args[0] ; String userName = args[1]; String password = args[2]; String reportFile = args[3]; ReportDriver.runReport(databaseName, userName, password, reportFile); }else{ System.out.println("Usage:"); System.out.println("java DriveReportDriver databaseName userName password reportFileLocation"); } return; } }