3

I am using iReport to build jaspersoft reports and I am using Fishbowl as my DBMS.

I built my tables and in iReport is shows that my tables are relational but for some reason it is throwing me errors and will not run. It should be very simple. I am taking in a zipcode, date range or State Name and outputing the productName, total quantity fulfilled, zip and state abbreviation.

When I do upload the report to Fishbowl it runs but eventually crashes with an error saying it's out of memory. I do not believe this is the issue but it is an effect of what ever is causing the report to not run correctly. Maybe it's my joins?

Here is my SQL

SELECT
 STATECONST."CODE" AS STATECONST_CODE,
 ADDRESS."STATEID" AS ADDRESS_STATEID,
 ADDRESS."ZIP" AS ADDRESS_ZIP,
 SOITEM."PRODUCTNUM" AS SOITEM_PRODUCTNUM,
 SOITEM."QTYFULFILLED" AS SOITEM_QTYFULFILLED
FROM
 "STATECONST" STATECONST INNER JOIN "ADDRESS" ADDRESS ON STATECONST."ID" =     ADDRESS."STATEID"
 INNER JOIN "ACCOUNT" ACCOUNT ON ADDRESS."ACCOUNTID" = ACCOUNT."ID"
 INNER JOIN "CUSTOMER" CUSTOMER ON ACCOUNT."ID" = CUSTOMER."ACCOUNTID"
 INNER JOIN "SO" SO ON CUSTOMER."ID" = SO."CUSTOMERID"
 INNER JOIN "SOITEM" SOITEM ON SO."ID" = SOITEM."SOID"

The error is:

java.lang.OutOfMemoryError : Java heap space

Here are some screenshots to help as well.

enter image description here

enter image description here

enter image description here

Ashton
  • 363
  • 1
  • 4
  • 21
  • 1
    Are you sure this isn't the issue? https://plumbr.eu/outofmemoryerror/java-heap-space – Aaron Dietz Apr 07 '16 at 20:50
  • @AaronD i will do more work testing if that is the issue but I still doubt that that is the problem. I say that only because the amount of data I am passing is so small. I believe it is a path issue but I cant figure it out :/ – Ashton Apr 07 '16 at 20:55
  • 1
    @Ashton Did you check the query? How much records did you get? – Alex K Apr 07 '16 at 21:03
  • @Ashton OutOfMemeory is out of memory nothing else, you get probably when working on an image, you need to check tht you have no leaks and then you can only increase memory and for jasper report use the virtualizer. – Petter Friberg Apr 07 '16 at 21:23
  • @AlexK I wasn't able to test the amount of records. When i attempted to test it in the query designer it simply said none found. Which may be because iReport honestly is not good :/ – Ashton Apr 08 '16 at 17:12
  • 1
    @Ashton You should check the number if records with any DB client. Did you check the Petter's solution? – Alex K Apr 08 '16 at 18:50
  • @AlexK I am honestly not sure as to how to implament his solution :/ – Ashton Apr 08 '16 at 19:04

1 Answers1

1

When you have out of memory the general action is:

Java heap space out of memory

Related to jasper report it generates by default the entire report in memory, this can be changed using JRVirtualizer, see example in sample reference

Example (from sample reference using file virtualizer)

//Create the virtualizer after 2 pages filled save in tmp director
JRFileVirtualizer virtualizer = new JRFileVirtualizer(2, "tmp");

//Preparing parameters
Map parameters = new HashMap();
parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);
Community
  • 1
  • 1
Petter Friberg
  • 21,252
  • 9
  • 60
  • 109
  • How would I do this Petter? Thank you for always giving help! – Ashton Apr 08 '16 at 19:04
  • Please check out my new question Petter! http://stackoverflow.com/questions/36582313/wrong-number-printing-out-on-report-while-trying-to-sum-a-group-variable – Ashton Apr 12 '16 at 19:26