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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Null Dates

Status
Not open for further replies.

AyJayEL

Technical User
Jan 30, 2001
425
GB
I am trying to find where a child has left a school and not started at a new in school in our LEA. My report shows a child's school history in a sub report. I am trying to suppress the child row if there is no end date for the school. In other words they haven't left school. I am passing back the last date from the subreport and where there is no leaving date then of course it shows as a blank or null field. I have an initialising formula in the main report on the child group to reset the date and and a formula to display the variable. However, if I say; isnull({@Display} ) nothing happens. Obviously what looks like a null field isn't. Can anyone tell what it is?

Learn something new every day *:->*
AyJayEl
 
what is the formula for {@display} as well as any related formulas.

Software Sales, Training, Implementation and Support for Exact Macola, eSynergy, and Crystal Reports
 
In Main Report

In Group Header
@Initialise
whileprintingrecords;
onfirstrecord;
shared datevar enddate;
enddate = date(0000,00,00);
enddate

In the Group Footer
@Display
WhilePrintingRecords;
shared datevar enddate

In Details
@EndDate
whileprintingrecords;
onfirstrecord;
shared datevar enddate:=enddate

In Subreport
@EndDate
whileprintingrecords;
shared datevar enddate;
enddate:= {STUD_HIST.END_DATE}

The @EndDate in the main report shows the correct details. ie where there is an end date is the correct one. Where there is no end date it is blank (or null or empty, can't work out which!)


Learn something new every day *:->*
AyJayEl
 
This is wrong:

@Initialise
whileprintingrecords;
onfirstrecord;
shared datevar enddate;
enddate = date(0000,00,00); // should be := not =
enddate

Why not just set the default date to a known impossible date, such as 1/1/1920 and not worry over it?

Hard to tell from your layout what you're trying to do, but this seems pointless:

In Details
@EndDate
whileprintingrecords;
onfirstrecord;
shared datevar enddate:=enddate

And why the onfirstrecords?

Anyway, hope this resolves.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top