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!

can "CrystalReport1.SelectionFormula = ..." be used with formulas

Status
Not open for further replies.

chrisp909

Technical User
Aug 1, 2001
92
US
I am trying to use the CrystalReports1.SelectionFormula property of the CR object.

I can use it to filter unneeded records using an attribute of the table I am using.

i.e. {AdmittedStudent.AdmittedStudent_Country} like "Russia"

However:
Some of the columns in the report are derived and I would like to be able to filter them as well. I can do it in the CR IDE but using the exact same code in the SelectionFormula property within VB yeilds no changes in the report.

i.e.{@SelectionFormula} like "Whiskey"
 
yes...it can be done but the evaluation is done clientside in a second pass through the records once the sql has been executed....can be slow depending on the formula but sometimes unavoidable
 
Could you be a little more specific on the execution of your solution.

Are you saying "yes" I can do it from the SelecionFormula property. If so How?

Or are you saying "yes" it can be done but I have to rewrite the formula on the client side and pass the data to the report.

 
What is the formula for @selectionformula in the report?

Also, make sure that you are using CR syntax.
"Like" allows wild cards, and if you don't use any wildcards it is the same as "equal". Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guide to using Crystal in VB
tek@kenhamady.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top