• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1934
  • Last Modified:

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
0
feesu
Asked:
feesu
  • 9
  • 8
1 Solution
 
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
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
 
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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 9
  • 8
Tackle projects and never again get stuck behind a technical roadblock.
Join Now