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!

Calculation within

Status
Not open for further replies.

WTKnow

Programmer
Aug 3, 2006
29
US
I am a trouble today...
I have
Type Group
Account Group
Amount Group

In Account Group I have

Type Account Amount
DL 111 $45
DL 222 $-5

Result needs to be $40

However is this possible to do math within a field?
So far it is calculating per type not within a type.

Thanks

 
What i believe you are asking for is a summary to be performed at the Type grouping, does that sound right?

If so, place the type field in the details, right clikc it and select insert->summary->sum and select the type as the group to palce the summary.

If your summaries are created in a dfifferent fashion than what I described for creating the Type summary, you should post HOW they are created.

The method for accumulating sums from nested formulas that aren't basic formulas are as follows:

Type group header:
whileprintingrecords;
numbervar MyTotal:=0

Inner grouping formula:
whileprintingrecords;
numbervar MyTotal:=MyTotal + <your means for displaying the value at the inner group level>

Type group footer:
whileprintingrecords;
numbervar MyTotal;
"Total = " & MyTotal

-k




 
Thanks, I will try to use this solution and not to post anymore. Thanks again
 
Ahhh, hadn't realized you were the same person taking exception to my calling you on your lack of technical information in the other thread, or I would never have offered additional time your way.

Posting is a great thing, and I Love to help others, but not posting basic information that YOU would ask for were you intending to help someone will net more qustions, not solutions, hence waste everyone's time unless the responder to your post gets lucky and guesses at the solution required.

Don't be hesitant to post, but post basic information instead of vague bits:

Crystal version
Database/connectivity used
Example data
Expected output

For instance in your other post, you probably could have converted the text date to a REAL date using a SQL Expression, rather than using the Crystal cdate function, and better still, show your dba the door and then create a View which does the CAST or CONVERT of the date so that you aren't nesting the conversion into various client side processes.

And in this post, you might have used proper SQL to have already doen the grouping and aggregates, and then whatever grand totals would be required would be resolved by point and click.

Instead you prefer to satte the architecture to be used, and convey it with a limited grasp of English. No offense intended, I'm barely literate in just one language, although I can ask for beer in almost any ;)

Good luck, and try to take a more professional apporach to posting requirements, and I promise I and otehrs will always address you in kind, if not, well...

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top