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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

running totals evaluate formula problem

Status
Not open for further replies.

franklin1232

IS-IT--Management
Aug 29, 2001
207
US
I am trying to create a running totals field with an evalute formula.

{Y_CheckItem.SaleTime} in DateTime (2005, 06, 25, 15, 00, 00)
to DateTime (2005, 08, 30, 18, 00, 00) and {Y_CheckItem.MenuID}=9708

Everything I do seems to get messed up when I use the "in DateTime" function including record selection. My problem is I have two formulas. One should calculate sales for an item from 3-6 and the other from 9-12. Problem is both return the same value so it seems to be ignoring my time criteria, but works for the menuID criteria.
 
Getting "messed up" isn't very descriptive, try posting technical information:

Crystal version
Database/connectivity used
Example data
Expected output

If you're using the Evaluate->Use a Formula in the running total, and you are also using the record selection formula to limit rows based on time, you may be overiding values in the running total by filtering in the record selection.

Rather than the IN function, you can also use:

{Y_CheckItem.SaleTime} >=
DateTime (2005, 06, 25, 15, 00, 00)
and
{Y_CheckItem.SaleTime} <=
DateTime (2005, 08, 30, 18, 00, 00)
and
{Y_CheckItem.MenuID} = 9708

If this doesn't resolve, please state what "messed up" means, and post the requested informnation.

-k
 
If you are trying to restrict the times, then use:

date({Y_CheckItem.SaleTime}) in Date(2005, 06, 25)
to Date(2005, 08, 30) and
{Y_CheckItem.MenuID}=9708 and
time({Y_CheckItem.SaleTime}) in time(15,0,0) to time(18,0,0)

-LB
 
Create the tests as 'boolians', formula fields with no 'if' and which return 'true' or false'. Put them in a temporary detail line section below the regular one, and see how they are working.

Once you get them right, you can invoke them in the running total formula. @yourtest = true, or just @yourtest.

[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Thanks to all who responed, except synapsevampire. What's his/her deal. I don't have time to write my life's story to get help with a formula. I gave the formula and what I wanted it to do and I got my answer from lbass. It was really just a brain fart on my part. I needed to seperate the time criteria from the date criteria. Thanks again lbass.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top