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

[Solved]date display in the prompt

Started by BIsrik, 04 Oct 2005 11:01:16 AM

Previous topic - Next topic

BIsrik

I have two date prompts from and to date prompts. I am using the layout calculation to display the dates selected by the user. It displays like between september 20 2005 to september 21 2005.

I want the date range to display as 09/20/2005 to 09/21/2005. I checked out the data format in the properties also but that too didn't work.

Plz suggest me how to achieve this..

Srik

bdybldr

I've run into this issue also.  Has anyone found a way to parse out the begin and end dates?

sir_jeroen

For each date you use an individual dateprompt?
Try a calculated field: cast(?Date From? as date) and then apply formatting... that should do the trick..

bdybldr

#3
Jeroen, ReportNet Addict,
I was using the Date prompts with Range option.Ã,  I switched to 2 separate prompts and changed all the queries to Between ?BeginDate? and ?EndDate?Ã,  The only way that I have found to cast the fields to date is inside a list or repeater.Ã,  Is there a way to display it as a calculated display (ParamDisplayValue)?

Thanks for your help...much appreciated!!


sir_jeroen

bdybldr: How come you're calling me Jeroen? :D

bdybldr

Oops...sorry.  :-[  Thought that was your name.  ReportNet Addict is too long to type.

sir_jeroen

Gheghe.... :D

But unfortunately it ain't possible to do a formatting to the date range.. if you add the range in a calculation you'll see that only the start date is returned.. Therefore I think that the range is returned as an array of dates... So I think that if you want format it you'll have to disect the daterange using javascript. but then only html reports will be possible... So I would conclude: No.. it's not possible to do any reformatting...

turnonthejets

Does the attached report specification work for you? It's based on the GO Sales package.  This report uses two date prompts not a range.

I've added the Start Date parameter as a calc to the acutal list and hence the query as well, then used this as the layout calculation.  I can then apply the format to that item.

Have a look and let me know.

sir_jeroen

turnon... this works.. off course.. but the trouble is lying in the range that can not be formatted (Am I correct BISrik??)  Working with 2 individual date prompts will always work...

Note: BISrik do you have a problem with a range or with the date prompt????

turnonthejets

Sure, but wouldn't two prompts and a between filter work the same for him?  Maybe I'm missing something.  BISrik, give us a GO Sales spec that shows the problem you're having specifically and we can be sure we're fixing your exact pwoblem...

sir_jeroen

No... A between filter can't be formatted... because it's rendered on the server as a text string (when using a report expression) or as a single date (when using it as a calculation) Or I must be doing something wrong :S

turnonthejets

Still not sure that we're on the same page.  Have a look at the spec that I attached I'm using a between filter with two seperate prompts and adding the Start Date in a calc on the list allows me then to use that column in the header and format it correctly.....I guess we should wait until Srik has a look and let's us know if we helped or not  :D

BIsrik

guys, these calculation will work only when there is some data returned by the query. If for a particular date range there is no data then these calculations also would not be displayed.

immaterial u use between operator or in_range operator or >= and <= operators u cannot format the layout calucaltion of date prompts. This is what cognos said me...Its just given for enhancement and might come in cognos8. Can anybody who has cognos8 check on that...

Srik

bdybldr

Your right, Srik.  You cannot format date prompts but if you capture the prompt values in a query item and display it in the header, you can format the date if used as two separate dates.

I will verify if the dates will display if there is no data and get back to you on that.

bdybldr

Srik,
I can confirm that that no dates are displayed if there is no data when your filter is applied to a date field in the table, such as transaction_date. 

However, if you use a Time dimension table with all dates that is joined to your table that has no value for those dates, then it will properly display the dates selected in the prompt, even when there is no data.

If this is an important requirement I would recommend building this type of table if you don't have one already.


BIsrik

fine...thanks for all the suggestion.

Srik