Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Crystal Report X & Access Db Date Field Post Reply Post New Topic
Author Message
LB100
Newbie
Newbie


Joined: 17 May 2007
Location: United States
Online Status: Offline
Posts: 3
Quote LB100 Replybullet 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. 

Thanks for your help in advance.

Regards
LB100
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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>
IP IP Logged
LB100
Newbie
Newbie


Joined: 17 May 2007
Location: United States
Online Status: Offline
Posts: 3
Quote LB100 Replybullet Posted: 17 May 2007 at 12:57pm
 
I was manually editing this table everyday and keying the date.  When I manually key the date, CR X works fine.   
 
So, I thought I would automate this process and use the Date () -1 in default value to derive at yesterday's date.
 
So, when I view the table in access, I see yesterday's date properly.
 
On CR X, it is not coming accross when I use Date () - 1.
 
Thanks and apprecite your 1st reply.
Regards
LB100
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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>
IP IP Logged
LB100
Newbie
Newbie


Joined: 17 May 2007
Location: United States
Online Status: Offline
Posts: 3
Quote LB100 Replybullet Posted: 17 May 2007 at 2:17pm
 
Under Access, Under Design Mode, create a new dummy attribute with Date/Time as Data Type. 
 
You will see at the bottom Field Properties. 
 
Under Field Properties, Under General, you will see Data Value.  Under Data Value is where I have "Date () - 1".
 
Once again, thank you for your time. 
 
Regards
LB100
LB
IP IP Logged
BrianBischof
Admin Group
Admin Group
Avatar

Joined: 09 Nov 2006
Online Status: Offline
Posts: 2458
Quote BrianBischof Replybullet 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>
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
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



This page was generated in 0.035 seconds.