Jump to content
We've recently updated our Privacy Statement, available here ×

Textfield reportElement backcolor


gervor

Recommended Posts

Hi all..

I have a textfield and I want to set the backColor from a paramater.

I know this works in the text field expression:
"<style backcolor='"+$P{thisColor}+"'>"+$P{categoryName}+"</style>"

The problem with the above is that only the text itself has the correct backcolor.
I want the whole textfield width to have the backcolor.

I can force my categoryName parameter to have some spaces after it,
that looks fine in the preview, but when I open the generated pdf, then you dont see the extra spaces anymore.
Why is this?

So basically, is it possible to set a backcolor on the reportElement with something like this:
<reportElement isPrintRepeatedValues="false" mode="Opaque" x="0" y="0" width="495" height="18" backcolor="$P{thisColor}"/>

Thanks in advance..



Post Edited by gervor at 08/10/2009 09:40
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

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