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

Cannot sum a formular from the detail section 1

Status
Not open for further replies.

awinter

Technical User
Nov 6, 2001
15
GB
Hi, I am having a problem getting a formular to sum in crystal 8. I have created the following formular,

shared numberVar price;

if shared numberVar price<{RELACK.SELBSTKOSTEN}
then (({RELDLB.LAGERMENGE}*shared numberVar price)/{RELACK.BASIS})
else (if {RELACK.SELBSTKOSTEN}=0
then (({RELDLB.LAGERMENGE}*shared numberVar price)/{RELACK.BASIS})
else (({RELDLB.LAGERMENGE}*{RELACK.SELBSTKOSTEN})/{RELACK.BASIS}))

This is to compare part prices and value some stock.
The shared variable come from the part sales price data table and can have multiple values.
The data is grouped using the part number.
The problem I am having is that I cannot use the subtotal, Grand total function. Is there another way to put a subtotal in each section and also a grand total at the end of the report.

regards
Allan
 
You can assign the value of this formula to a cumulative variable, and call this variable in the footer of your report.

i.e.
Code:
whileprintingrecords;
numbervar grandtotal := grandtotal + {@yourformula}
in your detail section.

Follow the same process for your subtotal, but remember to reset the subtotal variable in the group header.

Naith
 
Spot on worked a treat, easy when you know how.

Thankyou
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top