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!

Total # of Records! Help

Status
Not open for further replies.

B1naryPro

IS-IT--Management
Jan 20, 2002
114
US
I am using the formula editor and i use this formula to grab total records:
select count(field) from table where field = "10"
but i receive an error stating: "The remaining text does not appear to be part of the formula"
Anyone know what's going on here? Any help greatly appreciated. Jimmy
Sys Admin
 
It looks like you are trying to put a SQL select statement into a crystal formula.

Please provide an explanation of what you are attempting to accomplish with this formula and how and where you created this formula. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Yes this is a sql statement and it works within sql but i know crystal reports is different so i was trying to troubleshoot the formula. What i am trying to do is get a total number of records of one field from a table and put it on a crystal report. For example total # of last names that = smith is 210 Jimmy
Sys Admin
 
Jimmy,

How are you doing this, Insert->Field Object->Formula Field?

Are dead set on doing this with a SQL statement? Or do you just want the results?

If you just want the results, then create a formula field as outlined above, and write a formula:

If {LastNameField}="Smith" then 1 else 0

Then sum this formula. Hid the details sections if you do not want to see all the details.


Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Yes i just want the results...
How do i sum this formula???
Thanks Jimmy
MCSE, MCSA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top