CrossTab group dates per month

0

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;

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

mheise's picture
5
Joined: Dec 27 2015 - 10:51pm
Last seen: 3 years 7 months ago

1 Answer:

0

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.  

elizam's picture
4016
Joined: Mar 5 2012 - 9:19am
Last seen: 2 weeks 3 hours ago
Feedback
randomness