Joined: 17 May 2007
Location: United States
Online Status: Offline
Posts: 3
Topic: Crystal Report X & Access Db Date Field Posted: 17 May 2007 at 12:19pm
I am running CR X and Access 2003 database.
I have a table defined as Employee and one of the fields is called RESDate and is defined as Date/Time.
The RESDate has a default value Date () - 1. Bascially, I am deriving yesterday's date. When I view the table in Access, I see yesterday's date in the field.
Now in CR X: I made a new connection and brought in this Access database and this one table. I moved the RESDate to detail line.
I do not see yesterday's date in CR. I did browse of the field in CR X and it shows blanks also. Any ideas ?
P.S.: I know in CR you can do DateAdd('d', -1, CurrentDate). But I want to pull the date from the table.
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 17 May 2007 at 12:49pm
How are you creating the date in Access? Do you have a query and the date calculation is part of the query? Or are you doing it some other way? If it's part of the query definitiion then I would think that CR has to see it and get its value. But maybe you have another method?
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 17 May 2007 at 1:28pm
I'm still missing something. How are you getting the date into Access again? Where are you putting the formula? You mention a table, but tables can't have formulas in them. You can put formulas in a query but it doesn't sound like you are using queries.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Posted: 17 May 2007 at 4:39pm
Hmm. I guess this is like the SQL default value. Don't know why it wouldn't work. Try this: Create a query that pulls all the fields over. But for the date put he formula in the query instead. I bet that works.
Please support the forum! Tell others by linking to it on your blog or website:<a href="http://www.crystalreportsbook.com/forum/">Crystal Reports Forum</a>
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum