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

Can't make Grand Totals off of an array field, How to? CR8.5

Status
Not open for further replies.

Digitalcandy

IS-IT--Management
May 15, 2003
230
US
I've got a formula, {@ReaCurAmount}, that I want to do a Grand Total on but Crystal will not allow it. The code for the formula looks like this;

WhileprintingRecords;
Stringvar array AdderRecUP := split({QuoteCalcDetails.TypeDesc},";");
ToNumber(AdderRecUP[3]);




Any help as to how to do Sums on arrays?
 
I'm not quite sure if this will help you, but just a few minutes ago I happened to come across the may issue (36) of "crystal clear" ( and there they have a hint concerning "use a summary on an array":

Basically its code example is:
Numbervar array mylist:=[4,5,6,3,2,5,6,7,8];
sum(mylist);

But take a look yourself and read the article, perhaps proves helpfull for your problem.
 
I would assume, according to your formula you want to create a summary of the 3 member of the array, and not the array itself.

If that's the case, change your WhilePrintingRecords to WhileReadingRecords.

Mike
 
mbarron, that worked perfectly! Thanks. What is the difference between the two functions?
 
They are "Evaluation Time" functions. (in the middle frame of the formula editer area)

They tell Crystal when to evaluate a formula.

WhilePrintingRecords calculates after all data is gathered. WhileReadingRecords calculates as data is being gathered, allowing use to use it in summarries.

There are certian occasions, such as shared variables, where WhileReadingRecords is not allowed.

Mike
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top