Jump to content
Changes to the Jaspersoft community edition download ×

Setting style to crosstab cell by inside content


cristinab

Recommended Posts

Hi,

It is possible to set the parent element style using the style of the child element?

I have a crosstab cell and I want to set its style dynamicaly using the style tag in the TextElement that is inside the crosstab cell(detail/detail).

Regards,

Cristina

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

What I am trying to do is to set the style of the cell (backcolor)depending on the value of the textField element .I can't use conditional styles because I do not know how many colors I have to display

This is why I thought I could change somehow the cell style using the <style> tag.I tried <style backcolor="red"> $F{displayValue}</style> as textExpression but the color is not apllied to the entire element :(.

 

 

Regards,

Cristina

Link to comment
Share on other sites

  • 2 weeks later...

This sort of works for me, but what happens is if a cell is null, it does not highlight.

Basically my report looks like this

 

date part1 part2 part3

11/16/06 1 1 3

11/17/06 2 1 2

11/18/06 1

 

I am passing in a boolean of true if the date is a weekend and if so fill the background color to yellow (I want to highlight the row), so the 11/18 date would be highlighted. It will only fill in the cell of part2 because it has data, part1 and part3 stay white. Is there a way to solve this?

 

Also, I tried to put a rectangle into the date header (so that 11/18/06 would be highlighted) but it overlaps the actual date, I can't send element to back. Any ideas?

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