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!

Total of column

Status
Not open for further replies.

cardimom

MIS
Sep 18, 2001
34
US
I have a report based on a query. I want to have a total of a field. I use the formula
NumberVar s:=Sum({Query.Total Data}) I keep getting "A number field or currency amount is required here"
I have used this in other reports and it worked. There also so no sum option for grand total other wise I would have used that. What am I doing wrong?

Thanks for the help.
 
you don't say where this formula is placed...if it works at all it should be in the footer after all data is brought in...

In general I don't like variable declarations to include complex calculations such as sums

Also sounds like you have no groups....so the formula would only work in a report footer
 
I figured it out all by myself. ::)
I will continue to use this forum though, I think it is great.

replicatestring("0", 15-length({RptInv2.InvNbr}))+{RptInv2.InvNbr}
 
In general, you don't use formulas to total field in Crystal, you just insert a total. Right click on the field you want totaled and click insert grand total. It does everything else.

Subtotals work the same way. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
I have tried this but there is no choice of sum only count, distinct count which adds up how many entries not the sum of all the entries. Like 1
4
11
Grand Total 3 not 15
 
The reason you cannot select sum and you only have count and disticnt count id your data is not a numberic value. You can create a numberic value using the tonumber() function. Software Support for Sage Mas90, Macola, Crystal Reports, Goldmine and MS Office
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top