|
-
Feb 28th, 2007, 01:51 PM
#1
Thread Starter
PowerPoster
Error in SelectionFormula???
I'm currently using Crystal Reports 10. I have a report where the RecordSelectionFormula is set to:
Code:
crDOC.RecordSelectionFormula = "Select * From tblBatchDetail Where rowID = " & mRowID
I get the following error message when this statement is executed. Please see attached screen print. Can I have my statement in a format such as this?
Thanks,
-
Feb 28th, 2007, 02:02 PM
#2
Frenzied Member
Re: Error in SelectionFormula???
crDOC.RecordSelectionFormula = "Select * From tblBatchDetail Where rowID = " & Cint(mRowID)
try this.
-
Feb 28th, 2007, 02:08 PM
#3
Thread Starter
PowerPoster
Re: Error in SelectionFormula???
That didn't work Besoup...
-
Feb 28th, 2007, 02:13 PM
#4
Frenzied Member
Re: Error in SelectionFormula???
hmm not sure what is causing it... can you just pass the row as a parameter to the report and use the selection expert inside of the report to execute the query?
-
Feb 28th, 2007, 02:28 PM
#5
Thread Starter
PowerPoster
Re: Error in SelectionFormula???
Well, what I had before seemed to be working, except my report was getting more data than it should have been. The formula before was this:
crDOC.RecordSelectionFormula = "{tblBatchDetail.rowID}=" & mRowID
-
Feb 28th, 2007, 02:29 PM
#6
Re: Error in SelectionFormula???
The RecordSelectionFormula is not a sql statement. It lets you specify different criterias or "programming logic". If possible Crystal will apply the different items within the formula to the Where clause. If not possible Crystal will first get the data from the database and then pass through all the data removing records that don't fit the formula.
This should be all you need.
crDOC.RecordSelectionFormula = "{tblBatchDetail.rowID} = " & mRowID
-
Feb 28th, 2007, 04:01 PM
#7
Thread Starter
PowerPoster
Re: Error in SelectionFormula???
Thanks for the verification Bruce!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|