Solved

shared date variable  problems

Posted on 2004-10-02
4
768 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
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…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

930 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now