Where clause functionality Crystal reports

Hi ,

I have to create a variable in crystal like (Count(ADM_ID) where Agent_Status=“Terminated”)

How can we create this in Crystal reports.I am using crystal reports for enterprise 2011.

Please reply

Regards,
Leninreddy


leninreddy19 (BOB member since 2011-06-21)

You’ll use a formula and a summary.

  1. Create a formula that looks something like this:

If {myTable.Agent_Status}=“Terminated” then {myTable.ADM_ID}

  1. At whatever level you need it (report or a specific group) create a summary that is a count of this formula.

Or you can create a running total where the field to summarize is ADM_ID, the summary is Count, then Evaulate on Formula where the formula looks something like

{myTable.Agent_Status}=“Terminated”

If you need the number at the report level, then Reset Never, otherwise reset on change of the group where you need the count.

-Dell


hilfy :us: (BOB member since 2007-04-16)

Thank You Hilfy for replying.

By doing First method i am getting 1713 which is right but with running total i am getting 1712 and that too if i place that in in report header or page header it is giving 0. I need the individual count to caluculate % of Terminated ststus among all status.

Regards
Leninreddy


leninreddy19 (BOB member since 2011-06-21)

Running total can’t go into headers - they are calculated as the data is being processed, so they’re only available in footers. Since you need it in the header, you’ll need to use the formula instead of the running total.

-Dell


hilfy :us: (BOB member since 2007-04-16)