Jump to content
We've recently updated our Privacy Statement, available here ×

dyanmic colorization of detail section


Recommended Posts

By: dreporter - dreporter

dyanmic colorization of detail section

2006-07-11 14:37

Hi, I am new to jasper reports and to java. I am using version 1.2.4 of iReport designer. I need to dispaly detail section in white and grey colors. Like one line white and the second line grey and till the end of the report. I have searched almost all posts here but could't find any sample. Any ideas how can this be done?

 

 

By: Lucian Chirita - lucianc

RE: dyanmic colorization of detail section

2006-07-11 23:50

This can be easily achieved with a conditional style that specifies a gray backcolor when $V{REPORT_COUNT} is even. Such a conditional style can be applied, for instance, to a frame that contains all the (transparent) detail band elements.

 

Check the scriptlet sample (from the JR distribution), you can find a working example there.

 

HTH,

Lucian

 

 

By: dreporter - dreporter

RE: dyanmic colorization of detail section

2006-07-12 08:25

Thanks Lucian. It worked. I am now able to display the details in two colors. Also I tried to run the scriplet sample but it gave following error:

1. Scriptlet cannot be resolved to a type value = (java.lang.String)(((Scriptlet)parameter_REPORT_SCRIPTLET.getValue()).hello()); <------->

Any idea what I am missing? Do I need to add some jar files etc?

 

 

By: Lucian Chirita - lucianc

RE: dyanmic colorization of detail section

2006-07-12 09:22

How are you running the sample? The samples are meant to be executed using Ant, therefore you need to do something like:

ant javac compile fill pdf

 

HTH,

Lucian

 

 

By: dreporter - dreporter

RE: dyanmic colorization of detail section

2006-07-12 14:49

I am running them in iReport designer. Is there any documentation that would help me in setting up ant correctly? thanks.

 

 

By: Lucian Chirita - lucianc

RE: dyanmic colorization of detail section

2006-07-13 02:18

You can consult generic Ant documentation at http://ant.apache.org/.

 

Regarding iReport, I think that what you need to do is to include the directory where you have the compiled scriptlet in the classpath. Or maybe there is some special way of handling report scriptlets in iReport, I'm not very familiar with this.

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