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

Need Help with creating a summary field

Status
Not open for further replies.

michpaus

Programmer
Oct 18, 2005
11
US
I have a field in my report that is a formula. It looks like this:
cdbl(Count ({pvmro_orders_over_2500;1.ctlitem}, {pvmro_orders_over_2500;1.internal_po_num})/Count ({pvmro_orders_over_2500;1.ctlitem}, {pvmro_orders_over_2500;1.ctlitem}))

I used the cdbl to convert it to a number because I want to in turn add up the values that I get from using this formula. However I get the error message "This field cannot be summarized" every time I try to do a sum on the formula field. I have tried inserting a summary but that doesn't work because the field is not one of the avaialble fields and the same thing happens when I try to do a running total. I don't understand why it's not an available field when it is on the report. Is there any way I can work around this or should I just scrap and restart?

Any help will be appreciated.
 
You can's summarise anything that already has a group or summary function, such as count.

You'll have to start again and do a summary count or running total.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
If you want a grand total, create a formula without the group arguments, as in:

Count({pvmro_orders_over_2500;1.ctlitem})/Count ({pvmro_orders_over_2500;1.ctlitem})

Not sure why you would need cdbl, since a count is always a number.

-LB
 
Thanks for all your help. I found a solution to my problem. I ended up creating a Global variable in my report header and creating fomulas based on the variable and placing them in the group headers in the report.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top