Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Collecting for a specific Month and Year Post Reply Post New Topic
Author Message
LearningAsIGo
Newbie
Newbie


Joined: 04 Apr 2011
Online Status: Offline
Posts: 15
Quote LearningAsIGo Replybullet Topic: Collecting for a specific Month and Year
    Posted: 10 May 2011 at 8:02am
The accounting department needs to redo the budget. I was tasked with creating this years income based on February's dates first.

I am creating a cross-tab report (assumed this would be easiest).

I am able to get every day that income was received but I want only the month of 2011 to display with the sum of these items.

This is what I created for my formula.

if {ACCOUNTING_AUDIT_TRAIL.TRAN_DATE}=MonthName(February) and
{ACCOUNTING_AUDIT_TRAIL.TRAN_DATE}=Year(2011)
then
{ACCOUNTING_AUDIT_TRAIL.TRAN_DATE}

When I check this i get the following error:

the ) is missing

Is there an easier or better way that I am not thinking of?
IP IP Logged
Keikoku
Senior Member
Senior Member


Joined: 01 Dec 2010
Online Status: Offline
Posts: 386
Quote Keikoku Replybullet Posted: 10 May 2011 at 9:49am
February should be quoted

Syntax-wise, you probably meant this


if MonthName({ACCOUNTING_AUDIT_TRAIL.TRAN_DATE}) = "February" and Year({ACCOUNTING_AUDIT_TRAIL.TRAN_DATE}) = 2011 then
{ACCOUNTING_AUDIT_TRAIL.TRAN_DATE}
IP IP Logged
LearningAsIGo
Newbie
Newbie


Joined: 04 Apr 2011
Online Status: Offline
Posts: 15
Quote LearningAsIGo Replybullet Posted: 10 May 2011 at 9:54am
Its telling me on my first field that a number is required here. This field displays date and time. It is a string field. Does that matter in this case?
IP IP Logged
Post Reply Post New Topic
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



This page was generated in 0.047 seconds.