Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Monthtodate Problem Post Reply Post New Topic
Author Message
tcrow59
Newbie
Newbie


Joined: 19 Sep 2012
Online Status: Offline
Posts: 6
Quote tcrow59 Replybullet Topic: Monthtodate Problem
     Posted: 19 Sep 2012 at 9:25am
CR 2008:
I'm using the follow formula to extract the month to date data in a report.

If {vw_Scale_Tickets.SiteBillingGroup} = "Waste Owners" and
{vw_Scale_Tickets.TicketDate}= monthtodate then
{vw_Scale_Tickets.TicketNetWeight}/2000 else 0

The code works fine but I need the month to date information not to include the current day the report is run. ... = monthtodate - 1 doesn't work. I can re-code but i'm curious if there is a way to continue to use the monthtodate syntax. There are many formulas in the report and I'm trying to keep it simple.

Thanks
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 19 Sep 2012 at 10:07am
If {vw_Scale_Tickets.SiteBillingGroup} = "Waste Owners" and
{vw_Scale_Tickets.TicketDate}= monthtodate
and {vw_Scale_Tickets.TicketDate} <> currentdate
then
{vw_Scale_Tickets.TicketNetWeight}/2000 else 0
IP IP Logged
tcrow59
Newbie
Newbie


Joined: 19 Sep 2012
Online Status: Offline
Posts: 6
Quote tcrow59 Replybullet Posted: 20 Sep 2012 at 3:28am
Thanks

I was looking so exclusively at the monthtodate syntax I couldn't see the forest for the trees.
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