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

trying to summarize a formula field 1

Status
Not open for further replies.

solmskid

ISP
Feb 24, 2003
56
US
using CR8.5 - SAP Table data source

attempting to summarize a formula field (numeric results)
but formula field not available for summary.
is there a constraint on formula fields?
is there a workaround ??
 
When having issues with formulas, it is benefitial to post the contents of the formula(s).

Withour seeing your formula, it is hard to tell the exact problem. Generally though, if you are using a summary function within the formula, you will not be able to create a summary off it.

Also, if you are using "WhilePrintingRecords" in your formula, this too will not allow a summary to be created.

~Brian
 
Perhaps your formula is not always returning a result, hence it won't be available to aggregates.

For instance a formula containing:

sum({table.field},{table.groupfield})

won't be available for the usual aggregates.

A formula like:

If {table.field} = "Sum me" then
1
else
0

Will be available.

Try posting technical information when requesting it.

-k

 
I get carried away and try to run before I can walk...thanks for your patience.
This is the fomula:
If {ETTIFN.OPERAND} = ["E_QTY_HIST","G_QTY_HIST"]
and {@TestKey} <> previous({@TestKey})
then {ETTIFN.WERT1} else 0

ETTIFN.WERT1 is numeric
@TestKey is a concatonation of three key fields used
to eliminate duplicate occurances

The results are fine in the detail section, but the problem
is trying to get a summary total at a group level


 
The reason you are not able to create a summary is because of the Previous function. The Previous function is a Pass 2 function and is evaluated at Print Time. Check out Multi-pass reporting in the help files.

You might try grouping on {@TestKey}, then move your formula into the {@TestKey} group header.
Change your formula to this:
Code:
If {ETTIFN.OPERAND} IN [&quot;E_QTY_HIST&quot;,&quot;G_QTY_HIST&quot;] tnen
    {ETTIFN.WERT1}
else
    0
You should be able to create a summary off of the formula now.

~Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top