Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Class Cast Exception During Compilation of JasperReport

843838Jun 23 2006
Hello,

I'm attempting to create a Jasper Report with several tables.
I am using a Table Model with two Columns(Jasper Report Format for SubReports, Data Source for the SubReports) .

When I use,

JRDesignExpression expression = new JRDesignExpression()
expression.setValueClass(net.sf.jasperreports.engine.JasperReport.class);
expression.setText("$F{JASPER_EXPR}");
designSubreport.setExpression(expression);


JRDesignExpression expression2 = new JRDesignExpression();
expression2.setValueClass(net.sf.jasperreports.engine.JRDataSource.class);
expression2.setText("$F{DATA_EXPR}");
designSubreport.setDataSourceExpression(expression2);


I'm getting the following exception,

java.lang.ClassCastException: net.sf.jasperreports.engine.JasperReport|

How to clear this exception?

Thanks for any help.

Thanks & Regards,
Sangeetha
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 21 2006
Added on Jun 23 2006
0 comments
100 views