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

Help with filtering data

Status
Not open for further replies.

ksbigfoot

Programmer
Apr 15, 2002
856
CA
I am using CR 10 and I am using a View out of SQL Server.
I pass in one parameter into the crystal report.
I get back 5 rows of data.
I have 4 fields in the view: ID, Value1, Value2, Value3.
I display ID, Value1.
What I would like to do is If Value3 is populated,
Don't display row if ID = Value3 OR ID = Value2.

Eg.) I get 5 rows of data like:
(1, First, , )
(2, Second, , )
(3, Third, 3, )
(4, Fourth, , 4)
(5, Fifth, , )

The results should show
(1, First, , )
(2, Second, , )
(5, Fifth, , )

Does anyone know how I can do this?
Thanks
 
I stumbled across this by accident.
The was looking at the Select expert and the parameter I passed in. I went into the formula editor and I noticed I could add in fields from what I returned back from my view.

So I added in:
and v_MyView.ID <> v_MyView.Value2
and v_MyView.ID <> v_MyView.Value3

and it works!!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top