Jump to content

Why use the printExpression can not preview?


forumman

Recommended Posts

I have my report that develop by Ireport 3.7.4 and Netbean 6.9. When i fill the printWhenExpression data  in the rectangle  I can't preview the report. But when I dont  fill printWhenExpression data it can preview. Who have the solve of this case? Help plz

thank you  very much

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Please post the source xml for your report.  Without it it will not be possible to diagnose your problem properly.

It sounds like your printWhenExpression is invalid.  Remember it is inline java, so it has to be properly constructed.  A well formed expression is something like these examples:

$V{myvariable}where myvariable is a java.lang.Boolean

new java.lang.Boolean($F{aTextField}.equals("testvalue")) where aTextField is a text field from your report query

 

new java.lang.Boolean($V{PAGE_NUMBER}.intValue()<3 ) where PAGE_NUMBER is the system variable that describes the current page number.  The example shown will display the object only on pages 1 and 2.

 

 

new java.lang.Boolean($F{anIntegerField}.intValue()<100) where anIntegerField is an integer field from your report query



Post Edited by jmurray at 10/28/2010 21:42
Link to comment
Share on other sites

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...