Link to home
Start Free TrialLog in
Avatar of Tigger996
Tigger996

asked on

shared date variable problems

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
ASKER CERTIFIED SOLUTION
Avatar of Mike McCracken
Mike McCracken

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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};
Avatar of Tigger996
Tigger996

ASKER

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.
Thought I had suggested the curly braces...oh well