Jump to content
Changes to the Jaspersoft community edition download ×

Need help displaying object information


Recommended Posts

By: Carole Song - miyu76

Need help displaying object information

2002-10-28 12:07

I am working with java servlets and was wondering if there was a way to pass in specific objects outside of my main query results and call their methods.

 

would it be possible to set my object as a parameter? I have tried to perform this action but have the following result in my report:

 

(((inetcourier.MyObject)parameter_TheObject.getValue())).getMethod()

 

when declaring this:

 

<parameter name="TheObject" class="inetcourier.MyObject"/>

 

<textFieldExpression class="java.lang.String">"($P{TheObject}).getName()"</textFieldExpression>

 

Am I attempting to do something that is unsupported or illegal? If someone could tell point me in the right direction, that would be great!

 

Thanks,

Carole

 

 

 

By: Teodor Danciu - teodord

RE: Need help displaying object information

2002-10-28 13:04

 

Hi,

 

The correct expression is:

 

<textFieldExpression class="java.lang.String">$P{TheObject}.getName()</textFieldExpression>

 

Remove the extra quotes.

 

Good luck!

Teodor

 

 

 

By: Carole Song - miyu76

RE: Need help displaying object information

2002-10-29 07:10

Thanks for the syntax correction =)

 

I actually have another problem and I don't see where I can go to fix it. inetcourier.MyObject extends a class called the PersistentObject, which is from a jar called the persistence layer. When I attempt to compile my work, i now get this error:

 

dori.jasper.engine.JRException: Errors were encountered when compiling report design:

D:Projectsinetcouriertempshowmanifest.java:0: Class pl.PersistentObject not found in class inetcourier.MyObject.

/*

^

1 error

 

at dori.jasper.engine.design.JRCompiler.compileReport(JRCompiler.java:145)

 

I am assuming that this error is occuring because jasper is unable to find the pl.jar. How do I set up Jasper so that it will be able to reference this library?

 

Thanks for your help!

Carole

 

 

 

By: Teodor Danciu - teodord

RE: Need help displaying object information

2002-10-29 12:47

 

Hi,

 

Here are the details about how to setup the

classpath for report design compilation.

 

http://jasperreports.sourceforge.net/quick.how.to.html#compile

 

You can check the "webapp" sample to see it done.

 

I hope this helps.

Teodor

 

 

 

By: Carole Song - miyu76

RE: Need help displaying object information

2002-10-29 13:37

that worked great! I just appended the jars I needed to what was already there on the classpath.

 

Thanks a bunch for your help!

 

Carole

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...