Home
Crystal Reports Training
Crystal Reports XI
Crystal Reports .NET
Crystal Reports Forum
News
Tech Support
Active Topics
Memberlist
Search
Help
Register
Login
Technical Questions
Crystal Reports Forum
:
Crystal Reports 9 through 2022
:
Technical Questions
Topic: Date Missing Problem
Author
Message
hugo69
Groupie
Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Topic: Date Missing Problem
Posted: 25 Feb 2014 at 9:23am
I created a report that I was wondering how I could reset a running total with a missing date. Example of the report is follows.
Group by Name
02/18/14 Huber Release 0.00
02/19/14 Huber Release 1.00
02/20/14 Huber Release 1.00
02/21/14 Huber Release 1.00
02/24/14 Huber Release 1.00
02/25/14 Huber Release 1.00
Running Total Sum : 5.00
I used the formula:
if ({Audit_Trail.AfterValue} ="Huber Release"
and {Audit_Trail.DateStamp} <= currentdate-7)
then 0
else 1
But is there a way to reset for the days missing (02/22/14 and 02/23/14) for a running total of 2.00
Thank you for the help!
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 25 Feb 2014 at 9:58am
If there are no breaks like for weekends and holidays, maybe. It would required the previous and dateadd functions.
IP Logged
hugo69
Groupie
Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Posted: 25 Feb 2014 at 10:33am
There are no holidays or weekends. What would the formula be with the dateadd function?
IP Logged
kevlray
Admin Group
Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Posted: 25 Feb 2014 at 1:21pm
I would think if you using formulas to do a manual running total then the formula might look something like this
shared numbervar somecounter;
if datediff(d,previous({Audit_Trail.DateStamp},{Audit_Trail.DateStamp}) <>1 then somecounter := somecounter +1
You would need another formula to show the counter
shared numbervar somecounter;
I think this is what your are trying achieve. I could be mistaken.
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 25 Feb 2014 at 3:31pm
in a crystal running total you would use kevray's formula
datediff(d,previous({Audit_Trail.DateStamp},{Audit_Trail.DateStamp}) <>1
as a the formula in the reset section
IP Logged
hugo69
Groupie
Joined: 15 Feb 2010
Online Status: Offline
Posts: 53
Posted: 28 Feb 2014 at 5:54am
I tried using the above formula and I keep getting the ") missing ". Is the formula wrote right?
datediff(d,previous({Audit_Trail.DateStamp},{Audit_Trail.DateStamp}) <>1
IP Logged
DBlank
Moderator
Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Posted: 28 Feb 2014 at 6:28am
sorry about that
datediff(
"d"
,previous({Audit_Trail.DateStamp}
)
,{Audit_Trail.DateStamp}) <>1
Edited by DBlank - 28 Feb 2014 at 6:30am
IP Logged
Printable version
Forum Jump
-- Select Forum --
Announcements
Talk with the Author
Self-Publishing
Job Postings
New feature request
Report Design
Data Connectivity
Technical Questions
Tips and Tricks
Crystal Xcelsius
Report Design
Data Connectivity
Writing Code
Tips and Tricks
Report Design
Data Connectivity
Writing Code
Tips and Tricks
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
HOME
|
FREE EBOOK
|
PROGRAMMING GUIDE
|
PURCHASE
|
REVIEWS
|
CONTACT ME
|
FAQ
|
LINKS
|
PRIVACY
|
CLICK PLAYS
|
KONACAD
© 2004-2026 Brian Bischof. All Rights Reserved.