Basic syntax is not supported in group or record selection formula

Experts,
My selection formula looks like this: " {Client_Profile_Products_GetAll;1.Client ID} = 101"
I keep getting this error: "Basic syntax is not supported in group or record selection formula."

I'm using XI RDC
feesuAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

bdreed35Commented:
Is that your whole record selection?
It looks like you are using a stored procedure.  Why don't you have this in the SP?  It would be more efficient that way.
0
feesuAuthor Commented:
I have a form in vb6 that enables the user to customize a full layout; columns, format, criteria.
0
mlmccCommented:
Does the formula include the " "

How did you select the field name?  If you typed it in try selecting it from the field list?

mlmcc
0
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

mlmccCommented:
Are you allowing the user to change formulas?  If so how?

mlmcc
0
feesuAuthor Commented:
hi mlmcc,
I loop thru the recordset to extract names of the fields and display them for the user.
The user selects these fields and based on their data type he creates a formula.
What i want to say is that there is no chance at all for a syntax error.
I have trimmed everything for getting no spaces.
The user has the right to change formula as many times as he wants.
Note: yesterday i changed the location of setting the selection formula. It was after setting the datasource of the report. Now it is after creating the whole report; header/datasource/detail/footer then selection formula. It worked fine after that. Now i got the error again.
0
feesuAuthor Commented:
mlmcc,
Just noticed that the first time i run the report it gives that error. I debug at runtime and move the cursor to the line after the "rptMain.RecordSelectionFormula = Trim(sSelection)" so it works without a selectionformula, then the next time i press on preview it accepts the formula without an error!
0
mlmccCommented:
What does sSelection equal?

What is the code you are using?

mlmcc
0
feesuAuthor Commented:
I mentioned in the begining, it is " {Client_Profile_Products_GetAll;1.Client ID} = 101"
But even if it any other formula, it keeps giving this error.
Now i discovered that the first time you press preview it works, next time it gives this error. then it doesn't then again it does... etc.
I have finally captured the err number and added an error handler to check for this number and resume next when it appears. In this case if the user is using any kinda formula he presses twice to get his filtered report.
And that's for sure not the way it has to be.
0
mlmccCommented:
WHen you capture the error can you "press" the button from code and make it run?

mlmcc
0
feesuAuthor Commented:
I can. But is this the final solution?!
0
mlmccCommented:
We shoukld be able to find a real solution.  That will make the interface to the user better.

mlmcc
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
feesuAuthor Commented:
I can handle that; not letting the user feel a difference.
But what's with that ugly error!! I have searched alots of sites and couldn't find more than 2 complaints of the same!
0
mlmccCommented:
What is the error?  Does it have any other identification?

mlmcc
0
feesuAuthor Commented:
I meant the error i'm always getting. The title of this topic.
0
mlmccCommented:
Haven't found anything on that error, that's why I asked if there was an error number asociated.

mlmcc
0
feesuAuthor Commented:
The error number is -2147189563
0
mlmccCommented:
Nothing in the Crystal database on the error.

mlmcc
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.