public String generateChallan(final ReceiptHeader receipt,final boolean flag){
  final List<BillReceiptInfo> receiptList=new ArrayList<BillReceiptInfo>(0);
  receiptList.add(new BillReceiptInfoImpl(receipt,egovCommon,new ReceiptHeader(),chartOfAccountsHibernateDAO,persistenceService));
  final String templateName=CollectionConstants.CHALLAN_TEMPLATE_NAME;
  final Map<String,Object> reportParams=new HashMap<String,Object>(0);
  reportParams.put("EGOV_COMMON",egovCommon);
  final ReportRequest reportInput=new ReportRequest(templateName,receiptList,reportParams);
  reportInput.setPrintDialogOnOpenReport(flag);
  return reportViewerUtil.addReportToTempCache(collectionsUtil.createReport(reportInput));
}

public String generateChallan ( final ReceiptHeader receipt , final boolean flag ) { final List < BillReceiptInfo > receiptList = new ArrayList < BillReceiptInfo > ( 0 ) ; receiptList . add ( new BillReceiptInfoImpl ( receipt , egovCommon , new ReceiptHeader ( ) , chartOfAccountsHibernateDAO , persistenceService ) ) ; final String templateName = CollectionConstants . CHALLAN_TEMPLATE_NAME ; final Map < String , Object > reportParams = new HashMap < String , Object > ( 0 ) ; reportParams . put ( "EGOV_COMMON" , egovCommon ) ; final ReportRequest reportInput = new ReportRequest ( templateName , receiptList , reportParams ) ; reportInput . setPrintDialogOnOpenReport ( flag ) ; return reportViewerUtil . addReportToTempCache ( collectionsUtil . createReport ( reportInput ) ) ; }
this method generates a challan for the given receipt
