Solved

Group records with custom yearly grouping

Posted on 2013-07-01
7
473 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 47

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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Crystal Reports 13 5 86
Passing a Text Box name to a Sub 6 102
fso.FolderExists("\\server\HiddenFolder$") 4 89
MS Access 03, TransferText, decimal places 8 85
Hello, In my precious Article  (http://www.experts-exchange.com/Database/Reporting/A_15280-Create-Project-in-Microstrategy-Part-I.html)we saw the Configuration part for Microstrategy which included Metadata Creation and DataSource Preparation as …
From implementing a password expiration date, to datatype conversions and file export options, these are some useful settings I've found in Jasper Server.
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…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

733 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