Jump to content
Changes to the Jaspersoft community edition download ×

rsteier

Members
  • Posts

    12
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by rsteier

  1. I'm not familiar with Swing, but is there a Swing setting that overrides which version of Java to use? If possible, can you remove Java5 from your machine?
  2. I tried manually putting in isUsingCache="true" for the element and it gave an error. Was this feature depreciated? Woops, copied it wrong. nevermind
  3. All, I was wondering if anybody could point me in the right direction for creating a report without the use of a SQL datasource. I am building a webapp with a Java middle tier with the following code handling the service call: URL t = this.getClass().getResource("/testreport.jrxml");//locally stored .jrxml template right now jasperReport = JasperCompileManager.compileReport(t.getFile()); String flatJSON = "{"Customers": [{"ContactName":"John Doe"},{"ContactName": "Jane Smith"}]}"; iStream = new ByteArrayInputStream(flatJSON.getBytes()); jsonDataSource = new JsonDataSource(iStream); jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), jsonDataSource); String dest = "C:\test.pdf"; JasperExportManager.exportReportToPdfFile(jasperPrint,dest);[/code]The main problem I'm having is actually populating data in the report. I would like to be able to create a JSON on-the-fly and pass it into the report. What is the best approach without using an SQL connection? All the demos I find do not focus on a non-SQL approach. I would like to feed in a more complex JSON data object, but from what I've seen jasper is a little buggy with handling more complex JSON objects. I followed the jsondatasource example that comes with iReport, but I am unable to reproduce the data retreival in my example. I am using iReport writer 5.0.1. I tried setting up a new Connection/Datasource pointing to a local file, giving it a Datasource Type of "JSON Datasource", but to no avail. I also tried manually putting in the field name (Field Name= ContactName, field type = java.lang.Stinrg, Description = ContactName)...nothing.The Report query is set to "Customers" (without quotes) and a Query langauge of JSON. I am able to compile this report, too, so that is not the problem. The problem just seems to be reading the data into the report and seeing it reflected in the outgoing PDF. Here Attached is the compile code from iReport: Thanks so much in advance for the help! [EDIT] - I'm attaching the source code. The editor doesn't seem to want to render the .jrxml code
  4. Could you post your code? Specifically, what you put exactly in the NAME and DESCRIPTION properties of your field. Thanks much!
  5. I'm also looking for a solution to this. There's very little out there about what to do. Please update this if you find a solution, and I will do the same!
  6. hey @bookworm, did you ever get this working? I'm trying to do the same myself. Thx
×
×
  • Create New...