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

CrossTab group dates per month


mheise

Recommended Posts

Hi.

My data source are basically single entries of a time tracking system. So it's the name of the person, a specific date/time, the name of the project that the person has worked on and the amount of hours that he/she spent. 

Java.lang.String user;Java.util.Date date;Java.lang.String project;Java.lang.Double hours;[/code]

My reports has groups for each project. Within each group-detail band I would like to use a CrossTab to visualize which person has spent how many hours on that project - but grouped by month. So the columns would be January, February, etc. and rows would be the persons. But how can I configure the CrossTab to sum date/time-stamps by months as columns?

Thanks in advance.

Matthias

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The easiest way to do this is when you are creating the crosstab.  When you select your date field and set it as a row or column group, in the right hand side of the wizard, you see some columns after the field name - Fields, Order, ..., Calculation.  Click on the value Unique in Calculation and it turns into a drop-down menu. Select Month from the menu.

You can also do it after creation by entering an expression in the Properties for that group. To do this, double-click on the crosstab and you get a separate editor. That editor has an outline view with a section that says Crosstab.  Expand that, and you see entries for each group. Click on your group, and then in the properties view you can edit the Expression.  Try setting it to MONTH($F{YOUR_DATE}) , but sometimes you have to do more to make it work.  

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