Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

shared date variable  problems

Posted on 2004-10-02
4
Medium Priority
?
775 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 500 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. …
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 …
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

722 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