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

Syntax for value incorrect near ""

Status
Not open for further replies.

kalnkato

Programmer
Nov 12, 2002
13
US
When selecting a discrete String Parameter on Enterprise, the user can click SELECT when no value is defaulted and a value of "" appears in the Selected Values box. When the report is processed, the following error occurs:

The syntax of the value for 'Parameter name' is incorrect near ".

Is there a way the user can be prevented from populating "" as a value for the parameter?
 
Create a parameter in your report call, say ALL, then add a default value of ALL for that parameter.

Add to your selection formula the tesging for "ALL". If this matches, then return ALL data.

Test it in the designer and if it works properly, re-add to the Enterprise system (if you are not editing the report being managed).

Cheers,

SurfingGecko
Home of Crystal Ease
 
SurfingGeko-

After adding ALL as a parameter, I still receive the error in Crystal Enterprise. When processing the report, and the parameter selection displays, the user can choose not to select a value from the drop down box. If they don't select a value from the drop down and click the Select button, the blank Value box puts "" as a selection in the Selected Values box. When the report runs, I receive the 'Parameter name' is incorrect near "" error.

Any additional help is appreciated.
 
'Parameter name' is incorrect near ""

this seems like a datasource error to me. If you run the query directly on the client with '' as the parameter value, doesn't it fail with the same error?

If not, show us your reports selection criteria.

Naith
 
The report does not fail with an error if I run the report on Crystal Professional. The "" value is treated like a blank. Here is my selection criteria:
Code:
{@AmtOverdue} = {?AmtOverdue} and
{sel_forward_balance_sp.SOP_DESCRIPTION} = {?BPStatus}

 
Hi,
Be sure , in your criteria, that you check for the "" or the ALL like this:
Code:
If {?BPStatus}= "" or {?BPStatus}= 'ALL' then
{@AmtOverdue} = {?AmtOverdue}
else
{@AmtOverdue} = {?AmtOverdue} and
{sel_forward_balance_sp.SOP_DESCRIPTION} = {?BPStatus}

This assumes that it is the ?BPStatus parameter that could be blank...

hth
[profile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top