COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: vishawaroop on 15 Dec 2015 01:02:23 AM

Title: ibm cognos 10.2.2-usage of javascript in the html item in prompt page.
Post by: vishawaroop on 15 Dec 2015 01:02:23 AM
hi,
i am fresher.i am asked to prepare one prompt page just to know how to use javascript ,i am asked to induse javascript in the htmlitem that should configure the prompts

requirement :
two value prompt
1 should contain fiscal year eg:2015,2016,2017.
2nd one should contain fiscal year quarter text eg:Q1,Q2,Q3,Q4.

the fiscal year value prompt must show the current year, and if the year (2015) completes it should automatically change to 2016.
the second quarter prompt must show the previous quarter not the current quarter eg:current quarter is q4 an it should show previous quarter as q3.
if the year 2016 is changed.and the user need to see the previos year i.e.,2015.the quarter must show as q4,not the 2016's  quarter

this is the task assigned.how to do this?
can anyone help me through this..?
Title: Re: ibm cognos 10.2.2-usage of javascript in the html item in prompt page.
Post by: BigChris on 15 Dec 2015 09:49:06 AM
When does your fiscal run from and to?
Do you have a date / calendar table in your database?
Are you running on an SQL server?
Will you only be looking for current or previous years (i.e. not future years)?
Will the user only be allowed to select the year and last years (i.e. only two possible values for year)?

Depending on the answers there might be a way to configure the prompts without using Javascript...
Title: Re: ibm cognos 10.2.2-usage of javascript in the html item in prompt page.
Post by: vishawaroop on 15 Dec 2015 10:05:54 AM
When does your fiscal run from and to?
Do you have a date / calendar table in your database?
Are you running on an SQL server?
Will you only be looking for current or previous years (i.e. not future years)?
Will the user only be allowed to select the year and last years (i.e. only two possible values for year)?

Depending on the answers there might be a way to configure the prompts without using Javascript...
----------------------------------------------------------------------------------------------------------
1. The fiscal year dataitem runs from 2025 to 2012
2.yes i do have date and calender table in my database
3.no.,the tak assigned to me is to look for current year and upcoming year not future years.
4.yes the user can only see two prompts (year prompt and quarter prompt)
5.i need a javascript to execute this. i.e,we will implement a html item near the prompts inorder to validate the prompt before running that prompt.
6.because i am asked to do this task through javascript
Title: Re: ibm cognos 10.2.2-usage of javascript in the html item in prompt page.
Post by: MFGF on 15 Dec 2015 10:59:47 AM
Hi,

Please don't use the Calendar on Cognoise to post new questions. If you're unsure how to post a question, please read the FAQs thread here (http://www.cognoise.com/index.php/topic,27563.0.html) and take a look at FAQ #3

Thanks,

MF.