Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: issue with formula Post Reply Post New Topic
Author Message
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Topic: issue with formula
    Posted: 03 Sep 2009 at 11:48am
i am new to crystal reports using 2008 version. In the page header,i have to display the text "Quaterly" if my parameter PERIOD starts with Q ( i.e., Q12008) and should display "Monthly" if it starts with any other alphabet than Q (i.e., JAN_2008). How do I create a formula for this.
I created a formula and then in the formula tried adding
 
if [?]P_PERIOD(1)="Q" then "Quaterly" else "Monthly"
 
where P_PERIOD is the input  parameter
 
 
it is throwing an error saying
number,currency,amount,boolean,date-time or string is expected here
I dont know how to code this formula.
Please guide me.
 
Thanks,
Kiran
share your knowledge
IP IP Logged
Jyothi Yepuri
Senior Member
Senior Member


Joined: 11 May 2009
Location: Australia
Online Status: Offline
Posts: 127
Quote Jyothi Yepuri Replybullet Posted: 03 Sep 2009 at 7:24pm

Try this
IF LEFT({?P_PERIOD},1) = 'Q' THEN
"Quaterly" else "Monthly"


Jyothi
IP IP Logged
kirandb
Groupie
Groupie
Avatar

Joined: 10 Jun 2009
Location: United States
Online Status: Offline
Posts: 69
Quote kirandb Replybullet Posted: 04 Sep 2009 at 6:06am
It works. Thanks
share your knowledge
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.031 seconds.