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

CRYSTAL DATA SELECTION

Status
Not open for further replies.

Mbroad

Programmer
Feb 26, 2004
49
US
I need to figure out a way in Crystal to do the following:

--Read CASE file (containing CASE number)
--For each CASE number, read DOCKET file (linked on a CASE_ID field)
--Keep and PRINT the detail from the CASE file if
-DOCKET file has either a GEFFCC and/or JAGFECC DOCKET
CODE
-DOCKET file has COLLCAP or RCOLLCAP (but not
both)
-if DOCKET file has both COLLCAP and RCOLLCAP DOCKET
code, ignore CASE and do not print
I have the basic report together but not the DOCKET logic.
This seems like it would be a group-selection, but I don't know how.

Your help is GREATLY appreciated!
MB

Government Coder Mark
 
Hi,
try this as a GROUP selection formula
Code:
{DOCKETCODE} IN ('GEFFCC','JAGFECC','COLLCAP','RCOLLCAP')

BUT, can you clarify - are there more than one DOCKET records for each CASE record? Not sure how 1 DOCKET record could have more than 1 CODE.





[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Insert a group on {case.caseno}. Create two formulas like:

//{@collcap}:
if {docket.code} = "COLLCAP" then 1

//{@rcollcap}:
if {docket.code} = "RCOLLCAP} THEN 1

//{@others}:
if {docket.code} in ["GEFFCC","JAGFECC"] then 1

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

(
sum({@others},{case.caseno}) > 0 or
sum({@collcap},{case.caseno}) > 0 or
sum({@rcollcap},{case.caseno}) > 0
) and
sum([maximum({@collcap},{case.caseno}),maximum({@Rcollcap},{case.caseno})]) < 2

-LB
 
Yes there are more than 1 DOCKET record per CASE record, so i am not sure that the group selection noted 1st above will work.

Government Coder Mark
 
I am trying the lbass solution and placed the formulas in my detail line. However, I cannot seem to keep the detail line (the formulas) from printing on the report. Any suggestions?

Government Coder Mark
 
I don't think you have implemented my suggestion correctly. You should create the first three formulas in the field explorer->formula->new. You do not have to place them on your report. Then place the last formula in the group selection area. I understand there are multiple docket records per case.

-LB
 
ok, just to clarify, I create the three formulas but do not place (other than the last one) in my report? I will try this but I don't understand how the first two formulas execute if they are not in the report.
I will try and let you know. Thanks

Government Coder Mark
 
The last one goes here: report->selection formula->GROUP.

The formulas are referenced in this group selection formula, so are "in" the report though not displayed.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top