Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Other Open Source Projects and the fly likes Passing an Array to iReport Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply locked New topic

Passing an Array to iReport

Steve Dyke
Ranch Hand

Joined: Nov 16, 2004
Posts: 1393
I have an array I need to pass to iReport. I am using JSP to call the report as such:

The parameter on the iReport is "reportArray", Parameter Class Type: java.lang.String[][]

I get the following error in my console when I run this:

[8/31/09 8:07:32:275 CDT] 0000001f SystemOut O net.sf.jasperreports.engine.JRException: Incompatible [[Ljava.lang.String; value assigned to parameter reportArray in the MainScheduleMatrixReportV4 dataset.
Anshuman Patro

Joined: Dec 03, 2009
Posts: 6
hey steve..

even i am facing a similar issue..

i.e i am passing an Integer[] as parameter to the .jrxml file .
in my .jrxml i have
<parameter name="id" class="java.lang.Integer"/>

Now its throwing me exception
"JRException: Incompatible [Ljava.lang.Integer; value assigned to parameter"

i m not sure how to resolve this..
Don't get me started about those stupid light bulbs.
subject: Passing an Array to iReport
Similar Threads
Problem in passing JRBeanCollectionDataSource as parameter to jasperreport
Build Array in Servlet And Pass Back to Ajax Callback
Problem in passing JRBeanCollectionDataSource as parameter to jasperreport
Returning a Value from a Post
Display a Chart from a Servlet to JSP