Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal formula for running previous month & daily Post Reply Post New Topic
Author Message
Nav522
Senior Member
Senior Member


Joined: 25 Aug 2009
Location: United States
Online Status: Offline
Posts: 166
Quote Nav522 Replybullet Topic: Crystal formula for running previous month & daily
     Posted: 30 Aug 2010 at 8:35am
Hello folks,
                Am trying to run a report monthly and daily. Was just wondering how would we create a formula for running it monthly and daily depending on the current date. i.e. if the current day is 1st of the month it should return the data for the entire previous month and if the current date is 2nd day of the month. The data returned should be for the 1st of this month. Any ideas would be appreciated.
 
 
Thanks a lot.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 30 Aug 2010 at 8:57am
(day(currentdate)=1
and
{table.date} in lastfullmonth)
or
(day(currentdate)<>1
and
{table.date} in monthtodate)
 
 
used in the select expert 


Edited by DBlank - 30 Aug 2010 at 9:49am
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