JasperStudio is a powerful tool for developing our custom jasper reports. It offers many possibilities and capabilities without effort. Today I shall demonstrate a very nice trick on how to use using Frames with Styles, an easy way to alternate background colors for list items.
Let’s get started:
- Create a new Blank report.
- Add a simple query to show active projects: code, name, description.
- Add attributes into a Frame:
- Create a style with a conditional style:
- Create an Expression to get the odd numbers or even numbers using REPORT_COUNT. For this demo I will use %2==1, but you could also use %2==0.
- Ensure Transparent checkbox is unmarked and choose your background color:
- Rename Style to something meaningful:
- Go to the Frame and apply Style you we just configured:
It's ready! You can check the Preview: