COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: kvchow on 15 Oct 2014 06:10:55 AM

Title: Regarding date Prompt in propmt page
Post by: kvchow on 15 Oct 2014 06:10:55 AM
Hi ,

I have a Date Propmt in Prompt page,here date range is showing like Jun 1,2012,Jun 1,2012,ihave the same date column in report page.

My query is if my user select date range in prompt page ,the parameter i am passing to report page,there my user wants format like.. from 2012-Jun-01 to 2012-jun-05(Pass parameter value) like this

I changed in report page and data is coming as expected format,Please find the attached doc

any Idea?
Thanks,
Kvchow
Title: Re: Regarding date Prompt in propmt page
Post by: BigChris on 15 Oct 2014 08:15:19 AM
So have you got two prompts, one for the start date and one for the end date? If you have then it sounds like you'd just need layout calculation that looks something like:

'Date:  ' + ParamDisplayValue(?pStartDate?) + ' To ' + ParamDisplayValue(?pEndDate?)
Title: Re: Regarding date Prompt in propmt page
Post by: kvchow on 15 Oct 2014 10:42:45 AM
Hi Bigchris,

Thank you for your reply

I will try your solution and i will let you know

Great thanks to u...

Thanks,
Kvchow
Title: Re: Regarding date Prompt in propmt page
Post by: kvchow on 16 Oct 2014 12:29:12 AM
Hi Bigchris,

i did the same what you mentioned ,but i am not getting the required format

I tried to create to lists and i taken the date column into the queries and i taken the data item in that i put the required format and now dates are coming as expected,here my problem is if there is no date  in prompt page for my selected date then that time it is showing s no data available,but my requirement is i need to display that date if there is no data also for that date

Any Help?
Thanks,
kvchow
Title: Re: Regarding date Prompt in propmt page
Post by: Joker on 16 Oct 2014 05:23:33 AM
Quote from: kvchow on 15 Oct 2014 06:10:55 AM
Hi ,

I have a Date Propmt in Prompt page,here date range is showing like Jun 1,2012,Jun 1,2012,ihave the same date column in report page.

My query is if my user select date range in prompt page ,the parameter i am passing to report page,there my user wants format like.. from 2012-Jun-01 to 2012-jun-05(Pass parameter value) like this

I changed in report page and data is coming as expected format,Please find the attached doc

any Idea?
Thanks,
Kvchow

Hi Kvchow,

-Add a query calculation to the Report and define the expression as the Date Parameter.
- Drag a singleton on the report page and associate it with main query.
-Drop the data item created to the singleton.
-click on the date data item.
-In Properties go to data format.
-select Format as Date.
-In Properties go to  Pattern and type yyyy-MMM-dd
-save it and run the report.

I believe You want to do this only.

Regards,
Joker
Title: Re: Regarding date Prompt in propmt page
Post by: kvchow on 17 Oct 2014 04:27:12 AM
Hi Joker,

I tried singleton,Layout calculation and run time calculation,But i didn't get the expected format

Thanks for youe replies

Thanks,
Kvchow
Title: Re: Regarding date Prompt in propmt page
Post by: sunny bachan prasad on 18 Oct 2014 01:31:56 PM
I think jockey method should work.Can you send the screenshot of the report output.
Title: Re: Regarding date Prompt in propmt page
Post by: Joker on 21 Oct 2014 07:53:13 AM
Quote from: kvchow on 17 Oct 2014 04:27:12 AM
Hi Joker,

I tried singleton,Layout calculation and run time calculation,But i didn't get the expected format

Thanks for youe replies

Thanks,
Kvchow

Hi,

These steps worked for me and will work for you also.
Please try once again.

Regards,
Joker
Title: Re: Regarding date Prompt in propmt page
Post by: kvchow on 21 Oct 2014 08:26:30 AM
Hi Joker,

Thanks for your replies

It is working

Thanks,
Kvchow