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

Does Jasper have this feature?


sukirtha

Recommended Posts

Hi,
I would like to know if the following feature is available in Jasper reports.

Please check the attached layout before reading further.

My report will have say some 10 columns. The columns 3 to 5 are related to each other (ex: employee salary details like basic, hra and gross). The next three columns (columns 6 to 8) are related to each other (ex: employee contact detail - address, email, phone) the rest of the details are some other details which may exist independantly. Now this report needs to pull the changes made to the employee details between two dates. So the report will list all the changes made to each and every employee grouping by say employee Id.

Now here is how I want the report to look like. There can be multiple rows for an employee. If there are no changes made to the 2 sets of related columns, then the next row must leave those two sets empty with data shown for only the independent columns. If there is any change to even one of the column in a related set, then all the columns in that set should display data in the next row. See the screen shot for better clarity.

Thanks in advance for your reply. [file name=screenshot.zip size=7676]

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

It is possible to be done

 

If im correctly understanding then each row will represent a record from the data source right?

 

OK, check the attached report, i have made you a small quick report that solves your main issue.

 

The main idea, is to change the color if the data changes. For doing this, i made a variable namely "var_date", its variable expression is the value of the field, in this case "valid_from" which is a timestamp.

 

simply, put a rectangle behind the textfield, and put in this in the Print when expression: "(!$F{VALID_FROM}.equals($V{var_date}))?Boolean.TRUE:Boolean.FALSE"

 

so if the variable equals the field, the rectangle will not appear, and vice versa.

 

Apparently, Jasper first fills the fields from the datasource, then the variables, which leaves you the time between so you can check if they are equal or not.

 

NOTE: if you show the variable "var_date" in a textfield, you will see that the variable is "null" in the first row, which means the variable is filled after the group ends.

 

sorry for my english, good luck

 

[file name=color_feature_sample.jrxml size=6373]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/color_feature_sample.jrxml%5B/file] size=321]http://www.jasperforge.org/components/com_joomlaboard/uploaded/images/color_feature_sample.JPG

Post edited by: medopal, at: 2008/07/16 13:55

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