Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: How to reset a shared datetime variable Post Reply Post New Topic
Author Message
jennifer_falcon
Newbie
Newbie
Avatar

Joined: 15 Jan 2009
Online Status: Offline
Posts: 35
Quote jennifer_falcon Replybullet Topic: How to reset a shared datetime variable
     Posted: 11 Jul 2011 at 12:55pm
Good Day,

Here is my issue. I have a report that contains a subreport. The subreport has a shared datetime variable called ReassignDate. This variable contains a date if a ticket has a Contact Time. I then use the variable in the main report to do date calculations.

The formula containing the variable in the subreport is called @Shared

whileprintingrecords;
shared datetimevar ReassignDate := minimum({@DateTimeSM});
ReassignDate;

I then use a formula in my Main Report to get the date. It is also called @Shared:

whileprintingrecords;
Shared datetimevar ReassignDate

When my report prints, the variable is working correctly on the first page of the report.
When I look at the data on the subsequent pages, the report doesn't appear to reset the information.

I have a formula in my Report Header that I was hoping would reset the variable, but it doesn't work. My formula in the Report header is:

shared datetimevar ReassignDate;
ReassignDate = DateTime(2000,1,1,0,0,0);

Does anyone know how I can fix this?

Thanks!

Jennifer





IP IP Logged
sharona
Senior Member
Senior Member
Avatar

Joined: 16 Oct 2008
Location: United States
Online Status: Offline
Posts: 255
Quote sharona Replybullet Posted: 12 Jul 2011 at 1:55am
try adding the following above shared
you may also look into reseting the variable in the sub
whileprintingrecords;
sharona
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum