Solved

shared date variable  problems

Posted on 2004-10-02
4
770 Views
Last Modified: 2011-10-03
I dont' know why this is happening but I've declared a shared variable in my group header like:
shared dateVar myDate := Date(0,0,0);


Then in my details the same thing but when i do this:

myDate := (myTable.myDate);

Is says that
(myTable.myDate) isn't a date.

Tigger
0
Comment
Question by:Tigger996
  • 2
4 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 125 total points
ID: 12209617
Verify the the datebase format and type.  It may be that in the database it is a DATETIME type

change to
DateTimeVar myDate := Date(0,0,0);


mlmcc
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 12209621
The field needs to be enclosed in curly braces instead of parenthesis.
Also, make sure that you redeclare the variable in the second formula:
One question for you, are you using a subreport to pass the variable to?  If not, a shared variable is overkill.  It wil still work, but it just takes extra resources.  You can use Global instead.

shared dateVar myDate := {myTable.myDate};
0
 

Author Comment

by:Tigger996
ID: 12209647
It was in curly braces... I just miss typed here.  
Thanks mlmcc that fixed it.
I also had:
myDate := Date({myTable.myDate});

and that worked as well.
0
 
LVL 28

Expert Comment

by:bdreed35
ID: 12209989
Thought I had suggested the curly braces...oh well
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question