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!

Select records problem

Status
Not open for further replies.
Nov 28, 2002
121
0
0
US
I have two fields

if ({F43121.PRLNTY} = "C " OR {F43121.PRLNTY} = "CS" OR {F43121.PRLNTY} = "CJ" )THEN
{F43121.PRMATC} = "2"

I want the above F43121.PRMATC = "2" to display only if F43121.PRMATC = "1" records exists for those letter types.

if ({F43121.PRLNTY} = "S " OR {F43121.PRLNTY} = "NS" OR {F43121.PRLNTY} = "J1" )THEN
{F43121.PRMATC} = "1"

I want the above F43121.PRMATC = "1" to display only if F43121.PRMATC = "2" records exists for those letter types.

**********************************
I can do it if it reads the records one row at a time. I would know what has already been read.
In the case I don't know how to handle it.
 
Crystal does read rows one at a time...

And this isn't valid:

if ({F43121.PRLNTY} = "C " OR {F43121.PRLNTY} = "CS" OR {F43121.PRLNTY} = "CJ" )THEN
{F43121.PRMATC} = "2"

You can't set a fields value.

Rather than describe what you're trying to do, try posting example data, CR and database type and version, and an example of the expected output.

-k
 
How does crystal read one row at a time?
Through what?


ex Data:

Field1 Field2
s 2
ns 2
j1 2
c 2
cs 2
cj 2
s 1
ns 1
j1 1
c 1
cs 1
cj 1

Expected Output
c 2
cs 2
cj 2
s 1
ns 1
j1 1


One row have to read at a time to see if that criteria passed through or not.
Do I do that in the Record Selection part of the Report or somewhere else?


 
Use this in your record selection
({F43121.PRLNTY} = "C " OR {F43121.PRLNTY} = "CS" OR {F43121.PRLNTY} = "CJ") OR (({F43121.PRLNTY} = "S " OR {F43121.PRLNTY} = "NS" OR {F43121.PRLNTY} = "J1" ))

Thats saying that the value in Field1 must be equal to one of the values stated to be included
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top