I have a strange problem with my Reports. I developed my report using Crystal Reports XI R2 and published it to BO Enterprise XI R2. I have a prompt with type’ Date Time’ in the report. When I run this report, i get a calender to select the date and the time value is passed as ‘12:00:00’ by default.
Now I migrated my reports to BO Enterprise 3.1 and opened the same report using Crystal Reports 2008. However, when i run this report now, i get a calender to select the date and a textbox to enter the time value like mm/dd/yyyy hh:mm:ss. By default, this time value is the current time in the system.
If I change it to 00:00:00, it takes it as 12:00:00AM only. Also if I change it to 01:00:00, it takes it properly as 01:00:00. i guess it is using a 12 hour time format instead of 24 hour time format.
I want to pass a default value of 00:00:00 to my report from the prompt. it is possible to change the 12 hour time format to 24 hour time format?
is there any alternate way of doing that?
maybe you should change your format for a date only field. when I use parameter I always put only Date and not DateTime. Now, in the report, if I put something like :
open.time = date range, where open.time is a DateTime and “date range” is a “Date”, then it takes every thing from minimum(date range) at 00:00:00 to maximum(date range) at end of day 23:59:59
However, could you please throw some more light on ‘open.time’.
Couldnt get what you have suggested
"open.time = date range, where open.time is a DateTime and “date range” is a “Date”, then it takes every thing from minimum(date range) at 00:00:00 to maximum(date range) at end of day 23:59:59 ".
It’s only an example with my codes, open.time is a database field. My point was that if you want to pass a 00:00:00 time, you could only pass a date and not a date time --> the default time of a “date only field” is 00:00:00.
In my report, open.time is a database field in a datetime format (like (07/20/09 7:52:35) but you can equal a datetime database field with a date only parameter field.
But the user wants to select ‘date’ and ‘time’ both from the prompt. So i could not change the parameter type.
However, with the parameter type as ‘dateTime’ it takes the user selected date but passes a default time as 12:00:00AM only. Even if I manually change it to 00:00:00, it still passes the default time value as 12:00:00AM only.
right click on the field where you have it in your design section, click on format field. In the “Date and Time” tab, you will see that you can change the format, and you can play in the “customize” section to have the field like : MM/DD/YYYY HH/MM/SS with the time as 24h instead of 12h.
second option is to change your default format, you go into “file”, and then “Options…”. In the Fields tab you will see the “Time” bouton and the “Date and Time” bouton. You would want to change the “Date and Time” so click on it and then go in the “Date and Time” tab. there you can to the same thing as option 1, but it will change the default type of all your date and time fields in all you reports, not only in this report.