Hi I am having sub report, which uses database to retrieve values. I am having main report, which is also doing same thing. While we call individually using java code,it works. But when we add subreport in mainreport,it doesnot retrieve value for sub report. Thanks Mathi Code:try{ connection = establishConnection(); System.out.println(connection); statement = connection.createStatement(); resultSet = statement.executeQuery(query); JRResultSetDataSource resultSetDataSource = new JRResultSetDataSource(resultSet); HashMap<String, String> jasperParameter = new HashMap(); jasperReport = JasperCompileManager.compileReport("D:\\Mathi_New\\Test-Java\\TestMathi.jrxml"); jasperParameter.put("SUBREPORT_DIR","D:/Mathi_New/Test-Java/" ); System.out.println("Error1...."); jasperPrint = JasperFillManager.fillReport(jasperReport,jasperParameter, resultSetDataSource); System.out.println("Error2...."); JasperExportManager.exportReportToPdfFile(jasperPrint, "D:\\Mathi_New\\Test-Java\\TestMathi.pdf"); resultSet.close(); statement.close(); connection.close(); }