about odd and even row implementation with ireport

hi all,
can someone help me to create dinamic report with ireport...
How i can display alternate row color ?
Who is Participating?
darkappleConnect With a Mentor Commented:
apply style to element. an element may be a rectangle drawn in detail section of report. remember to send the rectangle below the text.

Use conditional style.

A conditional style has two elements: a Boolean condition expression and a style. The
style is used only if the condition evaluates to true.

We have following code snippet to get alternating row color.

In this example, element with this style will get red backcolor. But the presence of conditional style changes the behaviour and when rendered on an even row, the same element will have blue backcolor.

A conditional style override the properties of parent style.

Hope this helps..

<style name="alternateStyle" fontName="Arial" backcolor="red">
                 new Boolean($V{REPORT_COUNT}.intValue() % 2 == 0)
        <style backcolor="blue"/>

Open in new window

fabiogaravelliAuthor Commented:
where i implement conditional style
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

fabiogaravelliAuthor Commented:
how i put the rectangle below the text field ?and the text field must have particular properties such transparent on so on ?
if you are using iReport for designing report file then you can draw a rectangle and send it to back.

Its like, you'll draw a rectangle in detail section, right click the rectangle and from the context menu send it to backward.
fabiogaravelliAuthor Commented:
done thx
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.