Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Group records with custom yearly grouping

Posted on 2013-07-01
7
Medium Priority
?
480 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
7 Comments
 
LVL 101

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 101

Accepted Solution

by:
mlmcc earned 2000 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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
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 49

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

Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

Question has a verified solution.

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

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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 …
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 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…
Suggested Courses

636 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