title: Jasper : Compiling same jrxml file into multiple output formats
body: <p>I am doing a POC with following requirement:</p>
  
  <p>I have two tables A and B in a database having same columns and column types.</p>
  
  <p>I am running the following query to get the differences between the two table viz. same key, different columns or row existing in one but not in another:</p>
  
  <pre><code> SELECT MIN(TableName) as TableName, ID, COL1, COL2, COL3 ...
   FROM
   (
   SELECT 'Table A' as TableName, A.ID, A.COL1, A.COL2, A.COL3, ...
   FROM A
   UNION ALL
   SELECT 'Table B' as TableName, B.ID, B.COL1, B.COl2, B.COL3, ...
   FROM B
  ) as tmp
  GROUP BY ID, COL1, COL2, COL3 ...
  HAVING COUNT(*) = 1
  ORDER BY ID
  </code></pre>
  
  <p>Once I get the difference rows in Java collection, I want to output them as a report. </p>
  
  <p>However, the requirement is that the output format should be configurable. For e.g. if the requirement is to generate PDF, output should be PDF. If the requirement is XLS, the output should be XLS. </p>
  
  <p>Now, I am exploring the possibility of generating a single JRXML file and compiling the same JRXML into a PDF or a XLS. </p>
  
  <p>Is it possible ? Can anyone please point me to a example where same JRXML is compiled into multiple output formats.</p>
  
  <p>Thanks for reading!</p>