Jump to content
JasperReports Library 7.0 is now available ×

Please Please help teodord its urgent !!!


Recommended Posts

By: apratimk - apratimk

Please Please help teodord its urgent !!!

2005-01-31 21:11

Hello ,

I am developing the report in which i want to change the backgrouond and foreground colour of the field dynamically depending on the contents of the field . I have partially suceeded in that in a manner that i can change the colour dynamically at runtime by using following code

 

JRElement[] jrElements = jasperReport.getDetail().getElements();

 

for(int i =0;i<jrElements.length;i++)

{

JRElement jrElement = jrElements;

jrElement.setForecolor(Color.Decode("#8B0000"));

jrElement.setBackcolor(Color.Decode("#0000CD"));

 

}//for

 

But i want to change the color depending on the containts of the field or element .

What is the way to read the containts of the field at runtime..

Please help me in this regard.

 

 

By: C-Box - c-box

RE: Please Please help teodord its urgent !!

2005-02-01 00:59

Perhaps a scriptlet could help you, that calculates the fore- & backgroundColor for the needed fields in it's method afterdetaileval.

 

hth

C-Box

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