title: Jasper Reports: How to pass multiple SQL queries from a Java Program
body: <p>I have constructed a Jasper Report using iReport tool, where in I have registered two data sets, one to polulate the data in a table, and other to display a chart. </p>
  
  <p>The configuration was successful using the tool and when i see the report it gives me proper data. How ever when i try to invoke the queries from a Java program I am lost. How do i go about handling this? I can only pass a single query with the sample source code I have in as my program. </p>
  
  <p>Sample Source code I am using: </p>
  
  <pre><code>            Connection conn = getConnection("172.16.88.171", "1522", "orcl", "audi", "audi");
          System.out.println("Got jdbc connection...");
          Statement stmt = conn.createStatement();
          ResultSet rset = stmt.executeQuery("SELECT DB_USER, OS_USER, USERHOST, STATEMENT_TYPE, SQL_TEXT FROM DBA_FGA_AUDIT_TRAIL");
  
  
          InputStream input = new FileInputStream(new File("E:\\jasper_reports\\sampleADPTemplate_chart.jrxml"));
          JasperDesign design = JRXmlLoader.load(input);
          JasperReport report = JasperCompileManager.compileReport(design);
  
          JasperPrint print = JasperFillManager.fillReport(report, new HashMap(), conn);
  
          OutputStream output = new FileOutputStream(new File("E:\\jasper_reports\\JasperReporttoPDF.pdf"));
          JasperExportManager.exportReportToPdfStream(print, output);
  </code></pre>
  
  <p>This only passes a single query; How do i go about passing multiple queries.</p>
  
  <p>Thanks.</p>