If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Error Case block Report studio

Started by anwar_pat, 28 Jun 2007 08:47:06 PM

Previous topic - Next topic

anwar_pat

Hi All,
i am getting following error while using case block.

Case
When [p_choice]=1 then ‘Page1’
When [p_choice]=2 then ‘Page2’
When [p_choice]=3 then ‘Page3’
When [p_choice]=4 then ‘Page4’
ELSE 'Page5'
End

p_choice is parameter of prompt and this case statment is expression of one string variable.

i am getting following error.

Parsing error on or around position 37 in the expression : "Case

When [p_choice]=1 then ‘Page1’
When [p_choice]=2 then ‘Page2’
When [p_choice]=3 then ‘Page3’
When [p_choice]=4 then ‘Page4’
ELSE 'Page5'
End
*

can anyone help me where i am doing wrong.

thanks n advance

MDXpressor

Did you copy and paste this text directly from the query?

I noticed that the qoutes around the Page 1 uses the formatted quote.  Look at the difference in the quote for Page 5 as opposed to Pages1 through 4.  ...just a thought.
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

anwar_pat

yeh..u r rite..thz...actually still i am getting another error. i mean my requriement is i have 1 report of 5 pages and i want to put prompt or link to navigate of each page.like if user select page1 then it should open page1 and so on...

so for that i have taken value prompt and defined static values like 1 - page1 , 2 - page 2 so on..
i have added one query and defined one data item say param and expression is ?paramaeter1?(prompt)
and then i have defined the string variable choice_var and added 4 values - 1,2,3,4 and written expression same case statment..now while running report its saying.

Conditional display values associated with prompt controls must

Conditional display values associated with prompt controls must not have an expression that is data dependent. The expression is ' Case [Query1].[param] When 1 then 'Pg 1' When 2 then 'Pg 2' When 3 then 'Pg 3' When 4 then 'Pg 4' ELSE 'Pg 5' END'.


do you have any idea wht this error s coming,pls help me.

thanks n advance.

MDXpressor

Maybe you should try employing bookmarks to accomplish this and deliver a small table of contents to each page, as opposed to providing a prompt.
No, a proof is a proof. What kind of a proof? It's a proof. A proof is a proof, and when you have a good proof, it's because it's proven.

-Jean Chretien

anwar_pat

again thz.now i have one problem.i have 5 pages of reports and want to put in portal,so it wil open in HTML.now the thing is i want to put kind of prompt on the corner so that user can navigate any page of report i mean if user select page3 thn it should show page 3 and again if user want page5 thn it shud show page5....

do u hav any idea how wil achive this.coz i want prompt in all pages of reports.