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!

Current Date and MTD

Status
Not open for further replies.

ChipF

Technical User
Nov 15, 2002
50
US
How do you show current date and month to date data in two separate columns. The selection formula is running current date, but I want a MTD column also.
 
Dump the selection formula, at least as it relates to current date. If you do not, you will never get Nov 1 thru 17th in today's report.

Make two formula fields as follows:

If {DateField} in CurrentDate then {DatabaseField} else 0
If {DateField} in MonthToDate {DatabaseField} else 0

Sum these 2 formula fields as needed.



Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
I can get the daily to work fine with this formula:

If {DLY_ACTIVITY.ACTIVITY_DT} = CurrentDate -1 then count ({DLY_APPLICATION.OPR_APPLICATION_NR}, {DLY_ACTIVITY.USER_ID}) else 0

however, Monthtodate is giving me the same data as daily when I use this formula:

If {DLY_ACTIVITY.ACTIVITY_DT} in Monthtodate then count ({DLY_APPLICATION.OPR_APPLICATION_NR}, {DLY_ACTIVITY.USER_ID}) else 0


 
You can't do the 'count' as part of the condition formula. Use the formula patterns shown by dgillz, and then subtotal and grand total those formulas. Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
I was having problems because the report was already created with grouping. I will just recreate the report and this will work, I tested it. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top