Comparison between months in Crystal Reports 11

10 pts.
Tags:
Crystal Reports 11
I have seven dates on my crystal report.I need to compare month of each date with the date the report is made to run(@Datebeg is the field for report date). I am using formula on my report as:
if month({Date1})=month(cdate({@Datebeg})) and 
month({Date2})=month(cdate({@Datebeg})) and 
month({Date3})=month(cdate({@Datebeg})) and 
month({Date4})=month(cdate({@Datebeg})) and 
month({Date5})=month(cdate({@Datebeg})) and 
month({Date6})=month(cdate({@Datebeg})) and
month({Date7})=month(cdate({@Datebeg}))
then (H1+H2+H3+H4+H5+H6+H7) else 1.
The output I am getting is 1,each time.The months are not getting compared at all.If I put OR instead of AND,that gives me sum of all H(1..7). Please help me with the comparison. Thanks in advance.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • carlosdl
    What makes you think the months are not getting compared at all?

    Are you sure you have run a test where all of the dates' month are equal to @Datebeg?
    84,495 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.

Following

Share this item with your network: