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

Summary on Formula? 1

Status
Not open for further replies.

vikoch

Programmer
Feb 6, 2008
38
US
I created the formula "@units":

local numbervar units := Sum ({Activity.UNITS}, {Activity.CATEGORY});
if Sum ({Activity.UNITS}, {Activity.CATEGORY}) > 15 then 15
else
units

And, I want use this formula to summarize on; summary location - on group# 1

When I try to insert the summary, I cannot see this formula on "Choose the field to summarize".

Did I do something wrong?
Thanks.
 
You cannot sum a summary. You must use variables to accumulate, reset and display the value you want.

Software Sales, Training, Implementation and Support for Macola, Synergy, and Crystal Reports. Check out our Macola tools:
 
How do I do that? Could you help me with that.
Thanks.
 
{@reset} for the group #1 header:
whileprintingrecords;
numbervar x;
if not inrpeatedgroupheader then
x := 0;

//{@accum} to be placed in an activity.category group section:
whileprintingrecords;
numbervar x;
if Sum ({Activity.UNITS}, {Activity.CATEGORY}) > 15 then
x := x + 15 else
x := x + Sum ({Activity.UNITS}, {Activity.CATEGORY});

Then in the group #1 footer use:
whileprintingrecords;
numbervar x;

-LB
 
Do I place {@reset} for the group #1 header in "Section Expert"??
Also...what is "inrpeatedgroupheader"? It gives me error when I check for errors.

Do I create {@accum} and place directly on activity.category group section (group #2)??


Then, when I place
whileprintingrecords;
numbervar x;
on group #1 footer, I got an error "The formula result must be bollean"

Thanks.
 
Create these three formulas in the field explorer->formula->new and then place them in the specified sections on the report (NOT in the section expert).

That's a typo. Should be: inrepeatedgroupheader

-LB
 
lbass,

It works!
Thank you very very much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top