Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Previous Month Reports Question Post Reply Post New Topic
Author Message
CRXI210
Newbie
Newbie
Avatar

Joined: 21 May 2008
Online Status: Offline
Posts: 2
Quote CRXI210 Replybullet Topic: Previous Month Reports Question
     Posted: 21 May 2008 at 7:59am
Hello all, another newbie in need of help.  I have searched the forums and can not find the answer I need. 
 
I am looking for a way to create a report that would display the previous months info, while automatically updating on the first of each month.
 
For example, today is May 21 so I would like the report to display 1 April - 30 April for the rest of the month of May.  Then on 1 June I would like the report to display 1 May - 31 May for the entire month of June.  And so on.
 
Is this possible?  Any info would be greatly appreciated.
IP IP Logged
CRXI210
Newbie
Newbie
Avatar

Joined: 21 May 2008
Online Status: Offline
Posts: 2
Quote CRXI210 Replybullet Posted: 22 May 2008 at 1:13pm
Has anyone even heard of something similiar to this working in crystal?
IP IP Logged
Nauip
Newbie
Newbie


Joined: 18 Feb 2008
Online Status: Offline
Posts: 2
Quote Nauip Replybullet Posted: 28 May 2008 at 6:04pm
//Crystal Syntax:

numbervar d := datepart("d", {CurrentDate});
numbervar m := datepart("m", {CurrentDate});
numbervar y := datepart("yyyy", {Currentdtate});

{SomeInvoiceDate} in dateserial(y, m-1, 1) to dateserial(y, m, 1 - 1)

//this should match all invoices for the previous month.


Edited by Nauip - 28 May 2008 at 6:04pm
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