Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Need Formula to Display Quarter Post Reply Post New Topic
Author Message
bucky7199
Newbie
Newbie
Avatar

Joined: 17 Feb 2008
Location: United States
Online Status: Offline
Posts: 30
Quote bucky7199 Replybullet Topic: Need Formula to Display Quarter
     Posted: 21 Mar 2008 at 1:34pm
Hi everybody....need a little formula help here. The formula below works for me to pull my Account Balances for Year To Date:
 
if {GLPerBal.FiscalYear} = year({?End Date Year}) then
  if {GLPerBal.FiscalPeriod} <= month({?End Date Year}) then
{GLPerBal.CreditAmt} + {GLPerBal.DebitAmt}
 
I am scratching my head trying to figure out how to change it so it just displays quarterly info. For example, if it is the first qtr, I just want data for Jan Feb Mar, if it is second qtr I just want data for Apr May Jun.
 
Is there anybody good with formulas that can crack this?
 
Thanks!Ouch
Dan S.
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet Posted: 21 Mar 2008 at 1:57pm
Dan, I have all the date and time functions listed in Chapter 6 of my book Crystal Reports Encyclopedia. Use this formula to compare the date field to the parameter asking for a specific fiscal quarter to print.:
DatePart("Q", {GLPerBal.datefield}) = {?QuarterParam}

You can get more information at the link Crystal Reports eBooks.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
IP IP Logged
bucky7199
Newbie
Newbie
Avatar

Joined: 17 Feb 2008
Location: United States
Online Status: Offline
Posts: 30
Quote bucky7199 Replybullet Posted: 21 Mar 2008 at 2:19pm
Thanks Brian, that formula does the trick. Have a great weekend.Clap
Dan S.
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