If you are unable to create a new account, please email support@bspsoftware.com

 

Format the date prompt into DD/MM/YYYY when data is not present and display

Started by davidcognos, 29 Aug 2010 07:47:27 AM

Previous topic - Next topic

davidcognos

Hi,

I have a requirement in report, When the user selects the date prompt and if data is not present in the database we have to display the date format in page header as DD/MM/YYYY. The database is DB2. I have tried with the options of data format, extract, substring... But i am unable to achieve this.

When data is present, the format displays as DD/MM/YYYY, as I have applied the data format for the dataitem (?data?).

I Have tried with the calculation
[(rtrim(cast_char (extract ( day ,?date?)))+ '/' +  rtrim(cast_char (extract ( month ,?date?))) + '/' + rtrim(cast_char (extract ( year ,?date?) ))) ]


How can I display the date format as DD/MM/YYYY to the date prompt displayed in report when data is not present.

Please provide me the solution for this.

Thanks in Advance!!!



Gopinath

If your query returns empty result set then, the prompt value will not be displayed as it is also a part of the query. Try using layout calculation instead.

davidcognos

Hi,

I have tried with the layout calculation , but not able to achieve this format.

Any suggestion.......


Regards

Gopinath

Can you try ParamValue() instead of ParamDisplayValue()

jive

Hi,
If you used the date to sort later by date you can define a date like 01/01/1850 when the value return is null. That you will always have a value. You can also used an equivalent of what we have in Oracle a function like NVL it's in conjunction with null value. When the value return is null the function replace the null with a text saying "no date define" and in the prompt return all date in character in the format you need.
I hope my solution is clear Englisher is not my first language.

Thanks