COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Topic started by: tbarne1 on 01 Dec 2005 03:34:13 PM

Title: Automatic Padding in Text Box Prompt
Post by: tbarne1 on 01 Dec 2005 03:34:13 PM
All,

I have a prompt used to collect group numbers.   Our group numbers are 9 digits long (ex. 000000012).  In a ReportNet prompt, is it possible to have users only enter 2 digits and the other 7 digits be padded automatically?  I know you can do this when formatting report output (using ).  Is there anything similiar for prompts.

Thanks in advance.

Title: Re: Automatic Padding in Text Box Prompt
Post by: sir_jeroen on 01 Dec 2005 05:58:13 PM
Javascript.... that's all..
Title: Re: Automatic Padding in Text Box Prompt
Post by: mikegreen on 02 Dec 2005 09:00:08 AM
Quote from: tbarne1 on 01 Dec 2005 03:34:13 PM
All,

I have a prompt used to collect group numbers.   Our group numbers are 9 digits long (ex. 000000012).  In a ReportNet prompt, is it possible to have users only enter 2 digits and the other 7 digits be padded automatically?  I know you can do this when formatting report output (using ).  Is there anything similiar for prompts.

Thanks in advance.



In your filter, make the prompt item get padded to 9 digits. So your filter would look something like this:

[Group Number] = RIGHT(('000000000' + ?Group Number Prompt?),9)

HTH,

Mike
Title: Re: Automatic Padding in Text Box Prompt
Post by: tbarne1 on 02 Dec 2005 05:18:14 PM
Thanks Mike!  We are doing this in the filter to get the desired outcome in the report.  However the user wants a visual.  I am using the MultiSelect Text box.  When users enter 12 for example and then click insert they want to see 000000012 in the prompt.

Any ideas??

Thanks in advance.

Title: Re: Automatic Padding in Text Box Prompt
Post by: mikegreen on 05 Dec 2005 04:02:24 PM
Hmmmm... Multiselect? Doesnt the user select predefined values using the CTRL key?