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

SelectionFormula problems in VB

Status
Not open for further replies.

DrBobber

Programmer
Aug 18, 2000
3
0
0
US
I have created a report in CR 7 that works great and the Record Selection Expert allows me to limit my selection. However, I delete the Record Selection and then run the report from VB6 trying to use the exact Record Selection formula I cut from CR into the Selection.Formula property and generate the report and it errors out regarding this SelectionFormula. What am I doing wrong????
 
An Example is CrystalReport1.SelectionFormula = {Version.Version_ID} = 3. I have hard coded this is the code (I ideally will want to have the 3 come from the ListIndex for a ComboBox), and also in the properties for the control.
 
You need to put quotes around the formula : ie
CrystalReport1.SelectionFormula = "{Version.Version_ID} = " & cboBox.ListIndex
 
In the code I do put the quotes around it, but when manually inserting the formula in the controls property pages I don't do I?? Either way quotes, no quotes, nothing seems to work and I get the same meesage about the selection not being correct. Could I have a bad version of the Crystal Reports active-X control which is causing this problem?? If so is there a site to download a newer version?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top