Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Calculating Month and Year on the Report Header Post Reply Post New Topic
Author Message
bvineet
Newbie
Newbie


Joined: 07 Mar 2011
Online Status: Offline
Posts: 7
Quote bvineet Replybullet Topic: Calculating Month and Year on the Report Header
     Posted: 19 Apr 2011 at 1:26am
How to Calculate the Month and Year on the Report Header in the Crystal Report.

Suppose if I select the Date from the Parameter Field as :- 04/19/2011

It SHould Display as : Month/Year i.e. 04/2011 05/2011 06/2011  . . . .01/2012  02/2012  03/2012 (12 Months Display)

Suppose if i change the Date as := 11/19/2011
It SHould Display as : Month/Year i.e. 11/2011 12/2011 01/2012  . . . 09/2012  10/2012   (12 Months Display)

Kindly Help on the above Problem.

IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 19 Apr 2011 at 3:53am

you would need write a function or formula, but the key functionality that you will be using is DATEADD()

totext(DateAdd("m", 1, {?parameter}), "MM/yyyy") 
 
will display a date 1 month after the parameter date.
 
HTH
IP IP Logged
bvineet
Newbie
Newbie


Joined: 07 Mar 2011
Online Status: Offline
Posts: 7
Quote bvineet Replybullet Posted: 21 Apr 2011 at 11:17pm
Hi .
 
Thank you for the reply. It helped me to solve the problem.
 
Thanks and Regards.
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