Strings

Hi,

what I have:

a table with this data:

report date|preiod type|salesnum
2002-12-12|Month|$500
2002-12-12|QTR|$1000
2002-12-12|YEAR|$5000

this is just an example...  Don't worry about the logic of the data..

now, one group is Month in crystal reports.  If it says month, I want to show in the report these exact period titles:
I want to show which QTR we are in: in this case, Q4-2002
And which year we are in: in exactly these words, YTD-2002

What is the function and how do you do it, I am new to crystal reports.

Thanks,

Pat
lesultanAsked:
Who is Participating?
 
KososConnect With a Mentor Commented:
Calendar1stQtr, Calendar2ndQtr, Calendar3rdQtr, Calendar4thQtr

Specifies a range of Date values that falls within the 1st, 2nd, 3rd, or 4th quarter of the current calendar year. The first quarter of the calendar year includes all dates from January 1st through March 31st. The second quarter of the calendar year includes all dates from April 1st through June 30th. The third quarter of the calendar year includes all dates from July 1st through September 30th. The fourth quarter of the calendar year includes all dates from October 1st through December 31st.

So your function should look something like this:
If {REPORT DATE} in Calendar1stQtr Then
    "Q1-"&Cstr({REPORT DATE},"yyyy")
Else

If {REPORT DATE} in Calendar2ndQtr Then
    "Q2-"&Cstr({REPORT DATE},"yyyy")
Else

If {REPORT DATE} in Calendar3rdQtr Then
    "Q3-"&Cstr({REPORT DATE},"yyyy")
Else
If {REPORT DATE} in Calendar4thQtr Then
    "Q4-"&Cstr({REPORT DATE},"yyyy")

Hope this helps. Good luck!!
0
 
lesultanAuthor Commented:
sorry the question was not worded properly, I can clarify, but it sounds like an easy one to interpret anyhow.
0
 
the_balkCommented:
In the Crystal help, check out these topics:

Month
Year
Calendar1stQtr, Calendar2ndQtr, etc.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
lesultanAuthor Commented:
I don't have the help for some reason.. I press f1 and it doesn't work.. Can you paste the topics?
0
 
mlmccCommented:
Did you recently upgrade?

Take a look at

http://support.crystaldecisions.com/library/kbase/articles/c2009572.asp

mlmcc
0
 
lesultanAuthor Commented:
Thanks,

I needed the specific!

Pat
0
 
KososCommented:
Glad I could help !!
0
All Courses

From novice to tech pro — start learning today.