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!

Breaking down a formula by group

Status
Not open for further replies.

ymrs

Technical User
Sep 17, 2002
19
US
I have created a formula that shows all logged calls from a tracking software database (SQL). I have similar formulas that show me the total calls open and total calls closed in the time period. This only shows the overall total, but I need to break it down by the officer that logged the call. Here is the formula:

if ({CL_CALL_LOGGING.TIMEDATE_CALL_LOG} > {?Start_Date} and
{CL_CALL_LOGGING.TIMEDATE_CALL_LOG} < {?End_Date} then 1
else 0


I then have another formula that sums the count from this formula. I have been experimenting with breaking this down by officer without any luck. The total for each officer is actually the overall total. I have been experimenting with a formula {@Name} to break it down by officer:

if ({CL_CALL_LOGGING.OWNING_OFFICER} = {SV_HELP_CENTRE.REF}) then GroupName ({CL_CALL_LOGGING.OWNING_OFFICER})

This breaks down by the officers name, then the following formula is supposed to show the count for each officer:

if{CL_CALL_LOGGING.TIMEDATE_CALL_LOG} > {?Start_Date} and {CL_CALL_LOGGING.TIMEDATE_CALL_LOG} < {?End_Date} and {@Name} then 1 else 0

I keep getting a message that a boolean is required, and the mouse moves right in front of the {@Name} in the formula.
 
Dear Ymrs,

Have your tried grouping on officer? That would easily solve your problem because you can simply insert a summary of your existing formula by the group.

let me know,

ro Rosemary Lieberman
rosemary@microflo.com, Microflo provides expert consulting on MagicTSD and Crystal Reports.
 
hi

What is happening is that in your last formula you have stated just {@name}, but not what you want it to test it for. In Crystal, when you are doing this, it is looking for {@name} to be either a true or false.

Where is this formula, is it in the group header/footer or details section? You can create a running total on this formula and count per group and would not need to include {@name} in your test, making sure you have the reset on the group header.

Please let us know if this helps, or if you would like more information on this. If you are wanting more information, can you provide what version of crystal you are using and where you have these formulas that you have stated.
Eileen McEvoy
Crystal Reports Consultant and Trainer
emcevoy@crystalconsulting.ca
 
Thank you both for the suggestions. Thanks to you, my report works exactly as I had hoped. I was just making it harder than it needed to be.

::)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top