2006 JR Open Discussion Posted August 22, 2006 Share Posted August 22, 2006 By: dreporter - dreporter dyanmic colorization of detail section 2006-07-11 14:37Hi, 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:50This 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:25Thanks 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:22How 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:49I 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:18You 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now