Solved

Group records with custom yearly grouping

Posted on 2013-07-01
7
466 Views
Last Modified: 2013-07-24
Hi Experts,

I am creating a report where I need to group records yearly but it needs to depend on a specific date.
More in detail, my report is pulling employee records for their hours paid.
I need to show a total of hours paid yearly on the date he/she was hired

So if an employee was hired on 7/1/2010 then it needs to group and total as follows:

Range                                    Total hours paid
======                                  ===============
7/1/2010 - 6/30/2011                    456
7/1/2011 - 6/30/2012                    789
7/1/2012 - 6/30/2013                  1012

If you could guide me to the proper grouping formula I need to create I would really appreciate it

Thank you

CRM
0
Comment
Question by:carlosmonte
  • 3
  • 2
7 Comments
 
LVL 100

Expert Comment

by:mlmcc
ID: 39291596
How many years are you looking to see?

mlmcc
0
 
LVL 1

Author Comment

by:carlosmonte
ID: 39291610
since the employee started, so date of hire
if they started in 1999 then from 1999 to today
0
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 39291633
Try a formula like this

Local DateVar SaleYearStart := Date({Employee.Hire Date});
Local DateVar SaleYearEnd := Date(DateAdd('yyyy',1,{Employee.Hire Date}) - 1);
While SaleYearEnd < {Orders.Order Date} do
(
    SaleYearStart := Date(DateAdd('yyyy',1,SaleYearStart));
    SaleYearEnd := Date(DateAdd('yyyy',1,SaleYearEnd));
);

CStr(SaleYearStart,"M/d/yyyy") &  " -  " & CStr(SaleYearEnd,"M/d/yyyy")

Open in new window


mlmcc
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 1

Author Comment

by:carlosmonte
ID: 39291684
Seems to be working perfectly :)
I will test thoroughly and get back to you asap

Thanks!
CM
0
 
LVL 46

Expert Comment

by:Martin Liss
ID: 39351313
I've requested that this question be closed as follows:

Accepted answer: 500 points for mlmcc's comment #a39291633

for the following reason:

This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.
0
 
LVL 1

Author Closing Comment

by:carlosmonte
ID: 39351314
The solution has worked great.
Thank you mlmcc!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now