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!

Crystal selection formula...Is the following possible???

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
0
0
CA
Is it possible to do a selection criteria on two different fields (same data types) as follows?

.selectionformula = {tableA.idnumber} and {tableB.idnumber}

will it accept this? Will it work?

I am using version 5 and VB Enterprise 5

Thanks!

 
Do you mean like this?

if databasefield1 = databasefield2
YES

Or are you looking at:
if field = databasefield1 or databasefield2

You can do this also but the syntax is:
if (field = databasefield1) or (field = databasefield2)

I hope this helps!
Brett Please visit my websites!
 
what I'm trying to do is this:

on my actual report I have inserted renewal.contractid

but in my vb code I want to:

selectionformula = "renewal.counter = variables" AND "order.counter = variables"

but it's not working. it either reads just the first or returns an error. Help!
 

What's the error? It's not 'Type Mismatch' is it?

selectionformula = "renewal.counter = variables" AND "order.counter = variables"

will return this error in VB.

From what I see, you need:

selectionformula = "renewal.counter = variables AND order.counter = variables"

 
no, it's not type mismatch. Does it have something to do with my design of my report? In my report I have inserted the database field "renewal.ContractId" but i don't have an "order.contractID" field inserted anywhere on my report. Does that make a difference? and any grouping and section is based on details in my renewal id. I have decided I truly truly hate Crystal Reports.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top