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

Text Box Prompt

Started by mayocraze, 18 Apr 2011 02:34:23 AM

Previous topic - Next topic

mayocraze

Hi Experts,

I have the following three prompts:
Accounting Year - which is a text box prompt
Start Month - which is a value prompt
End Month - which is also a value prompt

Now I want to combine these three prompts into one...How can I do it?

I wanna use a text box prompt to combine these 3, but how can I control the format of the user entered year & month?

melee

Have you asked your users how it would be easiest for them to enter this information? That portion is critical to the design, especially with a start and end that you're trying to incorporate into the same box.

jcrouch

mayocraze,

What you are asking for is possible using javascript to run some checks on the format before it is submitted.

However, and I think melee has the same concern, this may not be the most user freindly way to accomplish this. Have you though of using a Date Prompt with the range set to Yes? You can pull the year and month out of the selections in your filters if you need it in that format.

But if you insist on the single text box Im sure we can work it out. Can you post an example of the exact format you need?

melee

Yeah, the key is user-friendly. I could make an omnibox for every report and it would make sense to me, but my users would throw me off of a roof.

mayocraze

Hi jcrouch,

Yes, I still insist on making it a single text box prompt...I would like the user enter sth in the format like '2010-01 to 10'. hmmm...... this formatting really looks weird.

errr...maybe alternatively, can I have sth like this? For the month part I can make a check box value prompt and enable multiple selection. Then I still wanna combine the year and month into one single prompt. Is there anyway this can happen?

Anyway, thanks a million for replying me!!! I'm really new to cognos....

Quote from: jcrouch on 18 Apr 2011 12:46:17 PM
mayocraze,

What you are asking for is possible using javascript to run some checks on the format before it is submitted.

However, and I think melee has the same concern, this may not be the most user freindly way to accomplish this. Have you though of using a Date Prompt with the range set to Yes? You can pull the year and month out of the selections in your filters if you need it in that format.

But if you insist on the single text box Im sure we can work it out. Can you post an example of the exact format you need?

mayocraze

errrrrrrrrrr, anyone can help :'(

jcrouch

Quote from: mayocraze on 18 Apr 2011 09:54:35 PM...
Yes, I still insist on making it a single text box prompt...I would like the user enter sth in the format like '2010-01 to 10'. hmmm...... this formatting really looks weird.

Its going to look weird to anyone using your report too. Does that example translate to: Jan 2010 to Oct 2010? If so you are limiting the date range your users can input; They can only range out to December of the first date's year. What if they wanted to range on: Mar 2010 to Mar 2011?

Quote from: mayocraze on 18 Apr 2011 09:54:35 PM...
errr...maybe alternatively, can I have sth like this? For the month part I can make a check box value prompt and enable multiple selection. Then I still wanna combine the year and month into one single prompt. Is there anyway this can happen?

Ive read that a few times and I am still not sure what you are getting at. It sounds like the users would select multiple months from a block of check boxes, and then type in a year-month also?

Sorry to sound so critical, but I want to understand exactly what you are needing to accomplish. Any JS solution for this will need to be tailored to the exact date format you choose. We will have to pull that string apart and check different parts of it seperatly and any change to the date format would completely change the code.

Also can I ask why you are opposed to using date prompts? You can pull the year and month out of the selection and put them back together in any format you need.

mayocraze

My problem is my user want to select discrete months... So for example, they wanna select '2010-03' and '2011-01' only.

In this case, I dont think date prompt is a good choice as it only allows on a range of time.

What I can think of now is I can make a value prompt with check boxes and static choices defined as "2010-01,2010-02...2011-01,...".

But in this case, how am i supposed to write my filter? I only have accounting year and accounting month as two seperate columns in my report...





Quote from: jcrouch on 20 Apr 2011 08:19:10 AM
Its going to look weird to anyone using your report too. Does that example translate to: Jan 2010 to Oct 2010? If so you are limiting the date range your users can input; They can only range out to December of the first date's year. What if they wanted to range on: Mar 2010 to Mar 2011?

Ive read that a few times and I am still not sure what you are getting at. It sounds like the users would select multiple months from a block of check boxes, and then type in a year-month also?

Sorry to sound so critical, but I want to understand exactly what you are needing to accomplish. Any JS solution for this will need to be tailored to the exact date format you choose. We will have to pull that string apart and check different parts of it seperatly and any change to the date format would completely change the code.

Also can I ask why you are opposed to using date prompts? You can pull the year and month out of the selection and put them back together in any format you need.

167505

if your DB is oracle, then you can use the Cast function to control or change the datatype of the entered prompt value..

or you can also try to combine the accounting year and month in a dataitem and convert it as date to use as a date prompt..

[accounting year]||'-'||[accounting month]||'-'||'01'

name this as date .. And now use cast functions to convert this as date and use this in your report..

it will be something similar to
select cast ('1997-10-22' as date) from dual;

Regards,
Nag