Hi all :)
I have one requirement regarding display of year in prompt.
I have Year which is in the format 'yyyymm'
the format to be viewed in prompt should be between July 1st (the year before) and June 30th (current year).
'yyyymm' format should be changed to 'dd/mm/yyyy' format.
example of how the year prompt need to be displayed:
01/07/2010 – 30/06/2011
01/07/2011 – 30/06/2012
and so on.....
pl do guide on this..
many thanks for any help :)
any help :(
Add a data item to the source query. Something like
'01/07/'+substring([Year]-100,1,4) + ' - 30/06/' + substring([Year],1,4)
Are you using date prompts? If so, by default the data format in the prompt will be "Jul 1, 2010". I am not sure why you want to change formats in prompts. It is the format in the report that users generally want to control.
Sriram.
http://www.cognosonsteroids.com (http://www.cognosonsteroids.com)
Hi Paul
Many thnks for your reply.
if i use this am getting error.
also how to write filter in the query on this prompt to limit the output data between 2 dates.
Please do help on this which is much needed.
Many thanks
No it is not a date prompt just a value prompt.
What error are you getting and what database are you using?
Its throwing some sql error.
its Oracle database.
Quote from: New@cog on 07 Mar 2012 06:59:26 AM
Its throwing some sql error.
its Oracle database.
Well that certainly narrows things down significantly :o
You didn't answer why you are using a value prompt instead of a date prompt and you aren't really providing any details to guide people who might be able to help you.
Hi ,
Even i am facing the same issue , can anybody have solution on this....:)
Hey,
Instead of using one prompt, you can use two prompts.
One promp From_date & oter To_Date.
Create a QUery Q1
---------------------
Year----------------(substring(Cast(yyyymm,Char(6)),1,4)
Month--------------(substring(Cast(yyyymm,Char(6)),5,2)
Day-----------------Case When Month='07' then '01'
When Month='06' then '30'
END
From_date------Day||'/'||Month||'/'||Year
Use a filter-----------Month='06'
Create another Query Q2
-----------------------------------
Use Same Query Item.
Filter------------Month='07'
Use these Quer in your prompt