Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Formulas, Running Totals? Post Reply Post New Topic
Author Message
Rick_Jack
Newbie
Newbie
Avatar

Joined: 15 Jul 2015
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Rick_Jack Replybullet Topic: Formulas, Running Totals?
     Posted: 15 Jul 2015 at 10:42pm
I am trying to figure out how to select a certain start date from a series of records.

The records are yearly based and may cover the whole of the year or a part of the year

The reference may be attached to the account multiple times within one year but the dates will not overlap.

The records are grouped on Account, Reference and charge type and i am creating running totals and formula fields to create a report which gives one line of detail for each unique occurance, however with the start date i am looking for the last start date which is the start of a contiguous run up until the last record, in the example below 01/04/2012.


Account         Reference      Charge Type Start Date  End Date   Status
   
61000000645  85615045020     V        15/12/2008  31/03/2009   C
61000000645  85615045020     V        15/09/2010  30/09/2010   C
61000000645  85615045020     V        01/10/2010  31/01/2011   C
61000000645  85615045020     V        01/04/2012  31/03/2013   C
61000000645  85615045020     V        01/04/2013  31/03/2014   C
61000000645  85615045020     V        01/04/2014  31/03/2015   C   
61000000645  85615045020     V        01/04/2015                        C

61000000645  85615045020     V        01/04/2012  31/03/2016   C
Running ttl  Running ttl Running ttl            ?               Formula   Running ttl

The above is what i am trying to achieve.

Thanks in advance

IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 16 Jul 2015 at 4:09am
You want to know when the first time there is a calendar date not covered by a row and then what was the date set that covered the prior day, correct?
Are you just displaying the result or do you need to use them in some other capacity?
Can you create a stored procedure or command object?
IP IP Logged
Rick_Jack
Newbie
Newbie
Avatar

Joined: 15 Jul 2015
Location: United Kingdom
Online Status: Offline
Posts: 2
Quote Rick_Jack Replybullet Posted: 16 Jul 2015 at 4:38am
I am tring to find the start date within the group of records which has no subsequent breaks up to the last record in the group, so the first record does not follow on to the second (end date of 31/03/2009 and start date of 15/09/2010) the next two records do follow each other then there is a break, the following 4 records follow in sequence up to the last (and cuurent) record which has no end date. So the date i want to display is the start date from the fourth record.

I cannot create Stored Procs or Command objects but other people within the organisation can.
IP IP Logged
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