Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Weird going ons with overwriting variables

Status
Not open for further replies.

NotSoCunning

Technical User
May 3, 2005
64
GB
Hi this is my first post here after being recommended by a colleague so go easy. I'm also relatively new to Crystal Reports.

I'm having a problem that when I grab a DateTime field from the database it erases another variable completely even if it's assigned afterwards.

E.g.
Local DateTimeVar date3;
Local DateTimeVar date4;
Local DateVar date2;
Local DateVar anotherdate;

date4 := {Applications.dteValuationDueDate};
anotherdate := DateValue(date4);
date3 := {Applications.dtePaymentExpected};
date2 := DateValue(date3);

As soon as date3 gets assigned date4 gets wiped. I can't see any reason why it should. Later on in the code I have to test the value of date4 so it becomes somewhat problematic.

Anyone with any ideas?
 
Missed a bit of vital information, this only occurs when date3 is empty. If it contains information then it works fine.
 
Solved, Crystal Reports simply decided it wasn't going to process valid code correctly. Copied it, Deleted it, recreated it and it worked a treat.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top