I have a field with datetime as datatype. I create a dictionary with that table. Now in the dictionary it is showing as a string !
How will I fix it ? I need to filter data based on this field in the report.
Please help
The customer needs a crystal dictionary. So I am preparing it and sending it.
I am using Crystal Reports Version 9. The dictionary version is latest ( That comes with Data compatability tools )
I am using SQL Server 2000 as database.
The reports have 2 - 3 tables and I have linked it. The issue is when I display a date field ( which is datetime format), it is showing as a string field.
I need to create a formula in the Crystal Dictionary itself using Date() or so, so that when I use that field from the dictionary it shows datatype as date !
You can always convert it in the report using date().
I just tried it and the same thing happened for ODBC, OLE DB and ADO, and it appears that Dictionaries don't support datetimes, so you may have to do this on the report side.
This might not be an issue any more but I have just been looking at dictionaries and found that you can pull dates into Crystal Reports as dates.
To do this open the dictionary and goto FILE/OPTIONS. In options select the 'SQL OPTIONS'. At the bottom you should see 'Convert Date-Time field to date', tick this box and OK the selections. When you save the dictionary and load it into Crystal reports the field which contains the date should be a Date object.
I had a DateTime field within my dictionary which was showing as a string in CR v8.5. When I did the above the field became a Date type within CR.
Lewis: Try using a SQL Expression and CAST it to a datetime, it's faster and you don't go through the problematic and no longer suggested layer of dictionaries.
Thanks for the suggestion. Normally I do not use dictionaries. I have created this one because someone in the ultimate wisdom has deemed that I should train several supervisors in my department to use Crystal Reports. Given that there abilities of writting reports is somewhat lacking the dictionary seemed to be the easiest way to give them access to the database.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.