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

Conditional formula

Status
Not open for further replies.

austin22

Technical User
Aug 6, 2007
66
US
Hello All,

I am using CR 8.5
I may have asked this question before, however, I cannot find a thread to answer this question for me.

I want to create a list of cases that are set on a particular docket and identify those cases that may need a complaint form. If complaint form is already on the case for a particular docket, I want my report to suppress those cases.

Here is my set up:
In the Report > Edit Selection Formula > Record place, I have entered:

{CASE_PARTY_ACTION_PHYT.ACTIONCODE} = "NJT" (This is the docket)

THEN

I have grouped the report by the case number{CASE_PARTY_ACTION_PHYT.CASENUMBER}

In the Formula Editor, I have entered a formula like this:
(I want to suppress cases that already have a complaint form)

if {CASE_PARTY_ACTION_PHYT.ACTIONCODE} = "COMPL" then
1
else
0

THEN

In the Report > Edit Selection Formula > Group place, I have entered this:

sum ({@COMPL},{CASE_PARTY_ACTION_PHYT.CASENUMBER}) = 0

THEN

I have moved my chosen fields into the Group Header #1 and this is what I get:

Code:
DefName        CaseNumber     Docket

John Doe          7415         NJT
Donald Duck       5987         NJT
Jane Doe          8524         NJT

My problem is that when I go look up case number 5987, there is a complaint form already generated on this case, when in my group formula, I said suppress the group that have a complaint form.

Any help you can provide will be greatly appreciated.

Thanks,

austin22

 
You are using the same field to identify the docket AND the complaint-->{CASE_PARTY_ACTION_PHYT.ACTIONCODE}. Is this a mistake?

-LB
 
Check the sun for being isnull, a common cause of unexpected logic problems in Crystal

If you did an IsNull test first that should work

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
No mistake. The complaint form is a Filing Action Type and the docket is an Event Action Type. However, the codes "NJT" and "COMPL" are both in the ACTIONCODE table:

Like this:

Code:
ActionCode        ActionDesc         ActionType      

NJT                Non-Jury Trial      Event
COMPL              Complaint Form      Filing
APD                Appearance Date     Action
 
You need to add the table twice. The alias table that appears will have an extension of _1. Leave your record selection formula as is, and then change your {@compl} formula to:

if {CASE_PARTY_ACTION_PHYT.ACTIONCODE_1} = "COMPL" then
1
else
0

I'm not sure what field you should link on, as I don't think we are seeing all fields or the bigger context for this.

-LB
 
You are great! That worked for me.
Have a good day!

austin22
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top