Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: snytax Post Reply Post New Topic
Author Message
Ashly
Newbie
Newbie


Joined: 12 Jul 2012
Online Status: Offline
Posts: 1
Quote Ashly Replybullet Topic: snytax
     Posted: 13 Jul 2012 at 11:03pm
What is wrong with this snytax?

if onfirstrecord then 0 else if bqn <> previous(bqn)then 0
else {@E.Date}-Previous({@E.Date})
IP IP Logged
CircleD
Senior Member
Senior Member
Avatar

Joined: 11 Mar 2011
Location: United States
Online Status: Offline
Posts: 251
Quote CircleD Replybullet Posted: 15 Jul 2012 at 10:31am
It also looks like you're trying to subtract Previous({@E.Date} from {@E.Date}.

Edited by CircleD - 15 Jul 2012 at 10:31am
IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 16 Jul 2012 at 6:37am
CircleD should have expanded the explanation, you cannot subtract two date, but you can do a date diff (example: datediff("d",Previous({@E.Date}, {@E.Date}).

I hope this helps.
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