Here’s another bitch. The Cognos #prompt()# macro.
In case you’re wondering about giving a default value to the prompt, here’s how you do it :
#prompt(‘prompt_name’, ‘prompt_type’, ‘default_value’)#
However, there is a catch. The prompt won’t accept just anything as its default value – the third argument can only be a column name in case of strings. However for numbers, it accepts numeric constants. For example :
#prompt(‘id’, ‘INTEGER’,’-1′)# is correct,
#prompt(‘name’, ‘STRING’, ‘HELLO’)# is wrong. It will have to be :
#prompt(‘name’, ‘STRING’, column_name)#
Weird. I’m not very sure about this, but After a lot of hit and trials on it, where there is no documentation available on this particular topic, I think this is correct.
Please let me know if this is correct/wrong, if you, like me are fedup with the lack of documentation too.