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

Formula Help - Newbie 1

Status
Not open for further replies.

tkschief

MIS
Apr 20, 2006
28
US
I am a newbie to writing crystal reports formulas. In fact, I've never written a formula in my life so I apologize for all of the questions. Here's my dilemma: I have a report grouped on case number and in the details it shows each assigned staff and their role name. What we want the report to show is only the case numbers that never had a supervisor or supervisor assistant assigned to the case. I have no idea which direction to go with this to even start. Any help would be greatly appreciated - Thanks!
 
In the field explorer->formula->new, create a formula {@supasst} like this:

if ucase({table.rolename}) in "SUPERVISOR ASSISTANT" then 1

Then go to report->selection formula->GROUP and enter:

sum({@supasst},{table.caseno}) = 0

This will return a display only of those cases with no supervisor or supervisor assistant. If you need to do a count of these cases, you need to use a running total where you distinctcount the caseno, evaluate for each record, reset never--since non-group-selected records still contribute to the more usual inserted summaries.

-LB
 
You are so smart - it works perfectly! Do you have any suggestions for reading material or websites to help me understand formulas or is hands on the best way to go?
 
Ken Hamady has a common formulas section and other helpful materials on his website: Just reading Tek-Tips posts should be helpful (I probably learned the most here), and the Help section in CR is actually very good. There are the George Peck CR books, too.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top