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

broschb

Members
  • Posts

    24
  • Joined

  • Last visited

broschb's Achievements

Apprentice

Apprentice (3/14)

  • First Post Rare
  • Collaborator Rare
  • Conversation Starter Rare
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. Bump I am getting the same error. Did you resolve this?
  2. What approach did you take to do this? I am trying to do the same thing, and want to avoid having to do as you suggessted. Has this been implemented in the 3.7 api?
  3. I am looking for the same thing, were you able to find the source for this?
  4. I have a report that allows the user to select some criteria to generate a design at runtime. If the user selects certain criteria it allows for many columns to be created. Currently I adjust the width of the report columns to allow them all to fit on one page. This causes issues w/ really narrow columns in some cases making the data unreadable. I would like to be able to wrap columns to a new page once the width of the page is exceeded. For example if I had 20 columns show the first 10 on one page and then create another page with the same rows, that shows columns 11-20. Is there any way to do this? I have looked at dynamicJasper, and it appears to not support this either. If I use crosstabs it automatically does this for me, but that approach is not robust enough for the current reports I am working with. Thanks,
  5. Harry, thanks for your insight. I have since moved on to using the jasper reports api. It does make things simplier in the long run as you have mentioned. The one problem that I have and am still trying to figure out, and am hoping you can help with is wrapping columns. If I have a report and the column width exceeds that of the page, have you found a way to wrap these columns to a new page? With crosstabs this was handled automatically. thanks,
  6. thanks, I have actually used the api to modify my jasperDesign object and recompile my report. The question I have is, how to I wrap columns. At times the columns I have, created dynamically from user input, exceeds the width of the page. How to I create new pages at the end of the report for the remaining columns. Crosstabs do something similiar when the columns exceed the width of the page, it prints the remaining columns at the end of the report on new pages. How could I achieve something similiar? thanks,
  7. I would definitely agree with you, learning the JasperReports api is very important. I am familiar with it, but I wouldn't say I know it to depth that you do. The example I gave was a quick and dirty example of a possible way to use crosstabs. It still needs work to make it look better, and to be honest I haven't looked at what would be involved. But it allowed me to create a quick example when I needed it. It all depends on what you need to accomplish. I have not written two jasper reports that are similar yet. This is the first report that I have needed dynamic columns for, and time will tell how this works. But I appreciate your insight into this. This seems like something a lot users encounter, and there does not seem to be straightforward way to accomplish this. :)
  8. I have run into the same problem, I just created a blog post that goes through solving this issue using a JRBeanCollectionDataSource, and specifying the columns at runtime. Check it out and let me know if you have any questions. http://broschb.blogspot.com/2008/05/dynamic-jasper-report-using-crosstabs.html
  9. I have run into a similiar problem, I just created a blog post that goes through solving this issue using a JRBeanCollectionDataSource, and specifying the columns at runtime. Check it out and let me know if you have any questions. http://broschb.blogspot.com/2008/05/dynamic-jasper-report-using-crosstabs.html
  10. I have run into the same problem, I just created a blog post that goes through solving this issue using a JRBeanCollectionDataSource, and specifying the columns at runtime. Check it out and let me know if you have any questions. http://broschb.blogspot.com/2008/05/dynamic-jasper-report-using-crosstabs.html
  11. It looks as if you are matching a person to a department using an int for department in the TestBeanPerson, and deptCode in the TestBeanDepartment, is this correct? If so I would just modify your existing beans, I would modify the Department bean to include a collection of Personbeans. Then in your java classes just create a department bean for each department and populate the collection of person beans in the department bean w/ the members of the department. You can then pass this into your report and for each department list the employees in the dept. I'm assuming that this is what you are trying to do. If you wanted to list each person by row w/ their dept. Then just create a personByDept Bean or something similiar, and in the java class combine the person and dept., and feed that bean into the report. I'm not sure of a way off the top of my head to combine two beanDS inside of the report.
  12. if you post your jrxml, i can have a better idea of what you are doing?, as well as a sample of what your datasource you're passing in is. i.e. what type of objects are in the list, do you have lists of lists?
  13. since you passed a copy of your datasource in as a parameter you can use this as the datasource expression $P{ds} And yes, the parameter ds passed in is of type net.sf.jasperreports.engine.data.JRBeanCollectionDataSource
  14. Not sure it this is too late, but in the Map you pass into your report add another parameter, in this case we'll call it ds. map.put("ds",new JRBeanCollectionDataSource(somelist)); and then create the parameter in your main report called ds and of type JRBeanCollectionDataSource. And use this parameter as your datasource to the subreport. $P{ds}
  15. Thanks for the suggestion, I did the following below and received the same results, is this what you were referring to? Code: BufferedImage image = new BufferedImage( width, height, BufferedImage.TYPE_INT_RGB«»); ByteArrayOutputStream baos = new ByteArrayOutputStream(); ImageIO.write(image, "png", baos); ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray()); Graphics2D graphics = image.createGraphics(); try { JRGraphics2DExporter exporter = new JRGraphics2DExporter(); exporter.setParameter( JRGraphics2DExporterParameter.GRAPHICS_2D, (Graphics2D) graphics); exporter.setParameter(JRGraphics2DExporterParameter.INPUT_STREAM,inputStream); exporter.setParameter(JRExporterParameter.JASPER_PRINT, ivrPrint); exporter.setParameter(JRExporterParameter.PAGE_INDEX, i); exporter.exportReport(); } catch (JRException e1) { // TODO Auto-generated catch block e1.printStackTrace(); }
×
×
  • Create New...