Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

QuarterToDate Function

Status
Not open for further replies.

ashark

Programmer
Nov 21, 2002
31
IN
Hi Group,
I have a doubt.
In CrystalReport 8.5 there are functions for YearToDate and MonthToDate.
I need functions for QuarterToDate and DayToDate.
Do I have to create formulas for them or are they available in some other format.

Please help.
 
In 8.5 there are some functions called Calendar1stQtr to Calendar4thQtr. If you don't have data postdated to future dates, you can use them for quarterly data manipulation as you would use Year/MonthToDate.

Otherwise a simple formula will do the same thing.

Naith
 
hi, can you please show me how to use CR 8.5 function for the Calendar1stQtr.
I have a table that contains date|amount|runningtotal
and need to run a report that generate sum each quarter. I am not sure how to use the above function.
thanks for your help
Al
 
Like this:
Code:
If {YourDate} in Calendar1stQtr
Then {YourAmount}
Else 0;
(If you're ever unsure about any of the functions mentioned in the forum, if you go into your copy of Crystal Reports, and press F1, the help files should give you quite a good breakdown.)

If you want to use your formula all year round, but are only interested in the current quarter, then you could use a formula to say:
Code:
If CurrentDate in Calendar1stQtr
Then 
If {YourDate} in Calendar1stQtr
Then {YourAmount}
Else 0
Else
If CurrentDate in Calendar2ndQtr
Then 
If {YourDate} in Calendar2ndQtr
Then {YourAmount}
Else 0
...and repeat until you have all four quarters accounted for.

All the best with your report,

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top