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!

Group Formula 1

Status
Not open for further replies.

austin22

Technical User
Aug 6, 2007
66
US
Hello All,

I am using CR 8.5. I have the following setup:

Code:
CNumber:  1234
Action:   Letter
Action:   Complaint Form

CNumber:  4567
Action: Letter

CNumber:  7890
Action:  Letter
Action:  Complaint Form

I want the report to display cases that have both the 'Letter' and 'Complaint Form' on any one case number. If both do not exist with each other then I want the report to suppress the case.

Here is my formula so far:
FormulaName = "ActionDesc"

if {Action.Table} = ["Letter","Complaint Form"] then
1
else
0

Then, I placed the formula in the group selection formula place as:

sum ({@ActionDesc},{CASE_PARTY_ACTION_PHYT.JEboA}) > 0

Yet, I get cases that have either on of the actions or both in any one case.

I want CNumber 1234 and 7890 to display only.

Your help will be greatly appreciated.






 
Continue...

The {CASE_PARTY_ACTION_PHYT.JEboA} is the CNumber and my report is grouped by the case number.

 
Use your record selection formula to limit the records only to those actions of type letter and complaint:

{Action.Table} in ["Letter","Complaint Form"]

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

distinctcount({Action.Table},{CASE_PARTY_ACTION_PHYT.JEboA}) = 2

-LB
 
Thank you for your response. I still get cases with either one of the 'letter' or the 'complaint form'.

I want the report to display cases that have both the
letter and the complaint form on one case. Then suppress the cases that have one of the other.

At first, I thought the formula worked until I scrolled down to be sure that it did work and this is what I am seeing:

Code:
CNumber:  1234
Action:   Letter
Action:   Complaint Form

CNumber:  4567
Action: Letter

CNumber:  7890
Action:  Letter
Action:  Complaint Form

CNumber:  4567
Action:  Complaint Form
 
Is CNumber the same as casenumber? You have to first insert a group on the case number, and then use that in the group selection formula in the group condition:

distinctcount({Action.Table},{table.casenumber}) = 2

If you do have a group on casenumber, then it looks like you have an outer group that is causing the casenumber to repeat, so please identify your entire group structure by fields you are grouping on, and please use terms (e.g., case number) consistently.

-LB
 
Yes, CNumber is the same as case number and the report is grouped by the CNumber.

Sorry for the confusion.

I figured out what I did wrong...I had the wrong criteria in my Group selection formula.

The report works just fine.

LB, thank you so much for your patience. [thumbsup2]





 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top