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!

VB and Crystal Selection Formula

Status
Not open for further replies.

B1naryPro

IS-IT--Management
Jan 20, 2002
114
US
I currently have the following formula passing a date variable to a crystal report. Here is the code for that:

rptFollowUp.SelectionFormula = "{CAO.DateReceived} in Date(" & Left(strControl, 4) & "," & Mid(strControl, 5, 2) & "," & Right(strControl, 2) & ") to Date(" & Left(strControl2, 4) & ", " & Mid(strControl2, 5, 2) & "," & Right(strControl2, 2) & ")"

Now I want to add another variable to this selection formula from another table. I want to add this formula rptFollowUp.SelectionFormula = "{CAOActions.Followcheck} = " & "'x'"


How would i go about adding this string to the current selectionfomula. Appreciate any help thanks

JPBinary
MCSE, MCSA
 
Try:

"{CAO.DateReceived} in Date(" & Left(strControl, 4) & "," & Mid(strControl, 5, 2) & "," & Right(strControl, 2) & ") to Date(" & Left(strControl2, 4) & ", " & Mid(strControl2, 5, 2) & "," & Right(strControl2, 2) & ")"
"and {CAOActions.Followcheck} = " & "'x'""

-k
 
Didn't work: Here is the formula do you see anything wrong??

rptFollowUp.SelectionFormula = "{CAO.DateReceived} in Date(" & Left(strControl, 4) & "," & Mid(strControl, 5, 2) & "," & Right(strControl, 2) & ") to Date(" & Left(strControl2, 4) & ", " & Mid(strControl2, 5, 2) & "," & Right(strControl2, 2) & ")" And "{CaoActions.FollowCheck}= " & "'x'"

thanks

JPBinary
MCSE, MCSA
 
Perhaps the "'x'"

Try just the "{CaoActions.FollowCheck}= " & "'x'"

Is it supposed to be the literal value X, or a passed value?

What about:

"{CaoActions.FollowCheck}= x"

-k
 
The value that it supposed to get is the field from a sql table. I only want to show records where the fields = x.

Thanks

JPBinary
MCSE, MCSA
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top