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!

Creating a count and total from a list 1

Status
Not open for further replies.

leedy33

Technical User
Jun 15, 2005
51
0
0
US
Im using crystal 8.5 and im my report i have a long list of methods used. I want to create a formula that counts up the total number used for each individual method, I then want to be able to have a total number of methods used. So in a way adding up all the total individual methods. The methods are used sporadically so one method could be used 10 times will another only once, in any certain date range. Any help would be much appreciated, and if more info. is need i will do my best. Thanks
 
Insert a group on {table.method}. Then right click on {table.method} in the detail section and insert a count at the group level. If you want the total count across all methods, insert a grand total using count. If you want to count a method only once, regardless of times used, then insert a distinct count.

-LB
 
I'll guess that you want to group by the method, right click the method field and select insert->summary->count, and select for each method and also check the include grand totals.

If this doesn't resolve, try posting:

Database/connectivity
Example data
Expected output

-k
 
What i want the output to look like is something like this:

--> Elements Count
Silver 8
Gold 5
Tin 12
Hydrogen 17
ETC. .....
TOTAL: 42

The problem that i think i might be running into is that Im doing the report with a parameter, where i can pick a date range and i will get what elements and how many were used during that time period. For a given day there can be 15 tests ran, and with each test there can be multiple elements used. The date assosciated with each element, i believe is causing my problem. I have made up a group with the (table.element) field and i then ran a formula count: -->
Count ({table.element},"group"{table.element})

Now this gives me the numbered of each element used like i want, the problem now is that the list that i want, like above is showing multiples of the same information, an example is follows:
--> ELEMENT COUNT
Silver 16
Silver 16
Gold 7
Tin 8
Tin 8
ETC.
I Have suppressed the dups already but for some reason there are some that are not suppressing and i do not no the reason why. I hope this makes it so you can understand as to what im looking for. Thanks
 
Do you have another group field? You should just have a group on {Table.element}.

Don't create formulas for your summaries. Instead, right click on {table.element} where it is placed in the detail section, and then insert the counts at the group and grand total level. Then go to the section expert and suppress the detail section and the group header section. Then drag the group name into the group footer section.

-LB
 
Thanks lbass, when i right-click on my group(element)which is in my details setion, i cant get to any count or grand total level. The SUMMARY tab in INSERT is faded out when im on the group. Im not really sure what to do when i right click on the group.
 
Go to the field explorer and select the same field you are grouping on {table.element} and drag it into the detail section. Do not try to use the groupname field. Then right click on it->insert summary->count.

-LB
 
Thanks alot lbass, it worked perfectly. My problem was i was using the groupname field, but it works great now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top