Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: YTD Calculations using Current Fields Post Reply Post New Topic
Author Message
rusty
Newbie
Newbie
Avatar

Joined: 07 Mar 2008
Location: United States
Online Status: Offline
Posts: 16
Quote rusty Replybullet Topic: YTD Calculations using Current Fields
    Posted: 28 Jul 2008 at 5:28pm
I have a report with Date Range parameters [From and To]. Also, the report has 4 fields per employee - Current hours, Current Amount, YTD Hours and YTD Amount. When I enter the date range, it is supposed to pull all of these 4 fields. It pulls Current Hours and Current Amount fields for the given Date Range.
Issue - I am supposed to use the SAME fields as Current Hours and Current Amount and calculate YTD amount and YTD hours. I am not sure how to do this. Can someone please help me to do this? Thanks
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 29 Jul 2008 at 2:36pm

If your parameters are limiting the data retrieved to just the data between the two parameter dates, you can't get the YTD data from that table directly.  If there's only one record per employee in the date range, it would be fairly easy to pull in a second copy of the table and set a filter on it for the current year's data.  However, I suspect that you can have multiple records per employee for the date range, correct?

What type of database are you using?  How familiar are you with SQL?  There is a way to do this using a Command instead of the tables, but you need to know some SQL in order to be able to do this.
 
-Dell
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.