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

Why can't you sum a {@formla} field? 1

Status
Not open for further replies.

Drakhan

Technical User
Jun 3, 2002
67
US
Does anyone know why one CANNOT sum a {@formula} field? I have a numeric formula, which is simply a subtraction of two other formulas. E.g., {@Total_time_in_seconds} is equal to {@LoginSeconds} - {@LogoutSeconds}.

The summation features, i.e., sum, grand total, running total are all gray'd out or do not show the formula for selection.

All I would like to to do is get a total of the column that contants {@Total_time_in_seconds}

Login Logout Total Time
360 120 240
100 50 50
Total 290

Login Logout Total Time
{@LoginSeconds} {@LogoutSeconds} {@Total_time_in_seconds}
HOW DO I GET A SUM HERE? -------------> ????

Thanks in advance!
 
If either of the formulas {@LoginSeconds} or {@LogoutSeconds} themselves use summary functions, their differences cannot be summed with the CR summary functions.
You could use a formula with a global variable as an accumulator.
 
In the help text, read up on Evaluation time - BeforeReadingRecords, WhilePrintingRecords are the most useful. This will give you a good understanding of how Crystal works and why you can't do some things - its all to do with the report being generated from multiple passes, doing something extra on each pass. Andrew Baines
Chase International
 
You can some any formula as long as it doesn't:

Use a summary operationn
Use a 'whileprintingrecords' function
use a shared variable
use another formula that uses one of the above Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Turned out to be the "whileprintingreports" issue. Thank you all for your insight!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top