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!

Need a help with @prompt function

Status
Not open for further replies.

Anu1284

Programmer
Sep 24, 2003
25
0
0
US
Hi,

I created an object named Department Prompt = @prompt('Enter Department','A','Deparment PromptLOV',MULTI,FREE). I created a filter with this prompt to select multiple values for the department. When using the filter in the report, the values selected does not get separated by commas. Instead they are separated by semi-colon. Hence when I run the report, I get the following error:

An unexcepted token "," was found following "'".Excepted tokens may include "+)-". The database that I'm pointing to is the DB2. Please let me know how to get rid of this error.

Thanks,
Anu.
 
What connectivity are you using. Are you using CAE or generic ODBC?

Another thought: What EXACTLY does your object say. Cut and paste the entire object here.

It should say something like table.department in @prompt(......)

Steve Krandel
Knightsbridge Solutions
formerly BASE Consulting Group
 
Hey,

I'm using IBM DB2 CAE connectivity.

The object "Department Prompt" object contains the following syntax in the select clause.

@Prompt('Enter Department or ALL for all Departments','A','Prompts\Department Prompt',MULTI,FREE).

"Prompts\Department Prompt" object has the SQL as "SELECT DISTINCT DEPT_ID FROM DEPT_TABLE". When I parse this object, I get the following error:

Parse Failed: [IBM][CLI Driver][DB2] SQL0104N An unexcepted token "," was found following "'". Excepted tokens include the following "+)-". SQLSTATE = 42601.

I ignored this error and used this in the Filter object. The filter object reads as follows:

@Select(Organization Information\Department) IN @Select(Prompts\Department Prompt).

Please provide a solution by which I can get rid of this error.
 
Your Department Prompt cannot refer to itself.

@Prompt is generally not used in and objects select clause. It makes no sense to do this.

Get rid of the @select stuff and build a condition object that does what you want. You can then later substitue the @select stuff back in.

But from what you have described, none of this is correct.

I can help, but you have to show EXACTLY what is in the Select portion of all objects involved.

If you want to send me the universe, I'll take a look.

skrandel@knightsbridge.com

Steve Krandel
Knightsbridge Solutions
formerly BASE Consulting Group
 
Hey Steve,

Thanks for the suggestion. I changed the department prompt to select the values from the table and used the prompt in the filter.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top