Jump to content

Alter report in runtime


tinti

Recommended Posts

I have a band that iterates over the records of a particular table.

The report should print the value of a table field, for example, the user name.

The user name field of the table, can bring value containing the following:

 

#BOLD#Sample1

#ITALIC#Sample2

#UNDERLINE#Sample3

 

According to the value that comes from the field, should I format the text on the label in a different way.

For that I need to change the formatting of the label in each iteration of the band.

 

Is it possible?

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Not the best solution but I think it works...

 

Use three fields (f1, f2, f3) on the same place (coordinates).

f1 has #BOLD# style

f2 has #ITALIC# style

f3 has #UNDERLINE# style

Set the printWhenExpression of each fields.

There is a sampe on jasperforge.org:

http://jasperforge.org//uploads/publish/jasperreportswebsite/trunk/samples/FirstJasper.jrxml

http://jasperforge.org//uploads/publish/jasperreportswebsite/trunk/samples/FirstJasper.pdf

Search for the printWhenExpression element int the jrxml file.

 

I hope it helps...

Laszlo

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