Jump to content
We've recently updated our Privacy Statement, available here ×

bobz28

Members
  • Posts

    34
  • Joined

  • Last visited

bobz28's Achievements

Explorer

Explorer (4/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Collaborator Rare

Recent Badges

0

Reputation

  1. Hi all, I have multiple subreports defined and everything is working great except that the report always prints out an extra report with null value. Does anyone know why? Thanks, Bob
  2. Hi Can I pass a collection of custom datasource as list to report and subreports? I tried this but then I got the following error: Caused by: net.sf.jasperreports.engine.JRException: Incompatible net.sf.jasperreports.engine.data.JRBeanCollectionDataSource value assigned to parameter REPORT_DATA_SOURCE in the masterReport dataset.
  3. Well, I bundled the classes into a jar file and included it in the classpath and it works fine. Couldn't include individual class though... weird, don't know why...
  4. Can somebody help...!!!! I included the abc.myservice.ClassBService class in the classpath and when I compile the template I get java.util.zip.ZipException: error in opening zip file...
  5. Thanks for your response... When I included the abc.myservice.ClassBService class in the classpath. I get java.util.zip.ZipException: error in opening zip file... Weird...Dod you have any ideas? Thanks-
  6. Hi all, I tried including the package but still get an error: java.lang.ClassNotFoundException: abc.myservice.ClassBService Any idea? Thanks-
  7. Hi, Can someone help show me how to pass diff datasource to subreport. I am having a problem where I want to pass an array of DataSource to master report. How can I pass datsource one by one from master report to the subreport. i.e: subds[0], subds[1]...subds[n]... Thanks--- Here is what I have in the controller code: ============================ HibernateQueryResultDataSource ds = (master datasource) HibernateQueryResultDataSource subds = new HibernateQueryResultDataSource[input.size()]; for (int i=0; i < input.size(); i++){ List<?> reportQuery = getReport(input.get(i)); String[] fields = new String[] {"a", "b", "c"}; subds = new HibernateQueryResultDataSource(reportQuery, fields); } model.put("dataSource", ds); model.put("subDataSource", subds); return model;
  8. Hi, I am having a similar problem where I pass an array of DataSource to master report. How can I pas datsource one by one from master report to the subreport. i.e: subds[0], subds[1]...subds[n]... Thanks--- Here is what I have in the controller code: ============================ HibernateQueryResultDataSource ds = (master datasource) HibernateQueryResultDataSource subds = new HibernateQueryResultDataSource[input.size()]; for (int i=0; i < input.size(); i++){ List<?> reportQuery = getReport(input.get(i)); String[] fields = new String[] {"a", "b", "c"}; subds = new HibernateQueryResultDataSource(reportQuery, fields); } model.put("dataSource", ds); model.put("subDataSource", subds); return model;
  9. Hi All, Well, I think I can create a subreport to handle this issue, but is there a way to call and pass it diff datasources? Thanks-
  10. Hi, Can somebody help... How can I append one report after another in Spring Hibernate framework? Here is what is look like in the controller: Map<?,?> model = new HashMap<?,?>(); List<?> report = getReport(); String[] fields = new String[] {"a", "b", "c"}; HibernateDataSource ds = new HibernateDataSource(report, fileds); model.put("title", title); model.put("dataSource", ds); ... return model; Thanks a lot. Post Edited by bobz28 at 08/25/2010 14:43
  11. Hi, I am using Spring+Hibernate, how can I appending one report after another in Spring+Hibernate framework? Thanks, Bob
  12. Hi shrije, Thanks for your reply, I am using Jasper with Spring framework and the Jasper template is the same for all reports... Can code similar to this happen inside the template or a scriptless? Bob
  13. Hi All, I am trying to create a template for a report that can be from 1 to many (around 10 reports) in one report output. Depending on the user input (~10 drop down lists and each list if selected will eventually populate a report). Ex. if user select inputs from 5 drop down lists then I will have to generate 5 reports, one after another, if they select 10 then create 10... What is a best way to accomplishing this? Thanks- Bob
  14. Lucian, I found a work around for this issue by adding a check for the returned column in question and convert it to Integer... i.e: ==== public Object getFieldValue(JRField field) throws JRException{ Object value = null; int index = getFieldIndex(field.getName()); if (index !=-1){ //This block is added... Object[] values = (Object[])currentValue; if("columnInQuestion".equalsIgnoreCase(field.getName())) { Integer myInt = new Integer(values[index].toString()); value = myInt; }else{ value = values[index]; } } return value; }
×
×
  • Create New...