Hi All, I have a developed a Java console app which is connected to a datasource and generating a PDF from a .jrxml file(which was created using JasperStudio). Here is the program: public class JavaCallJasperReport { public static void main(String[] args) throws JRException, ClassNotFoundException, SQLException { String reportSrcFile = "C:/jasperreport/CustomerDataReport/CustomerData.jrxml"; JasperReport jasperReport = JasperCompileManager.compileReport(reportSrcFile); Connection conn = SQLServerConnUtils.getSQLServerConnection_SQLJDBC(); // Parameters for report Map<String, Object> parameters = new HashMap<>(); Connection conn = SQLServerConnUtils.getSQLServerConnection_SQLJDBC(); JasperPrint print = JasperFillManager.fillReport(jasperReport, parameters, conn); File outDir = new File("C:/jasperoutput"); outDir.mkdirs(); // PDF Exporter. JRPdfExporter exporter = new JRPdfExporter(); ExporterInput exporterInput = new SimpleExporterInput(print); // ExporterInput exporter.setExporterInput(exporterInput); // ExporterOutput OutputStreamExporterOutput exporterOutput = new SimpleOutputStreamExporterOutput( "C:/jasperoutput/CustomerDataReport.pdf"); ................. Now, I want to pass an sql query say a select statement so that the PDF report generated should have only the values returned by the SQL query. I am using: parameters.put("QUERY", "Select c.FirstName, c.CompanyName from SalesLT.Customer c where c.CustomerID = 1"); but this is not working. Please help me. Thanks in advance.