hi, (using crystal7) iv duplicated my sub report and pu a check nulls formular on it then a shared value forula on my main report to suppress any blank details section. but now the formula i use to subtract one date string from another in the sub report has stopped working.could this be because it is calculating the formula twise? code=
Local dateTimeVar ax := DateTime(val(Mid ({calllog.stoptime},1,4)),
val(Mid ({calllog.stoptime},5,2)),
val(Mid ({calllog.stoptime},7,2)),
val(Mid ({calllog.stoptime},9,2)),
val(Mid ({calllog.stoptime},11,2)),
val(Mid ({calllog.stoptime},13,2))
);
Local dateTimeVar bx := DateTime(val(Mid ({calllog.starttime},1,4)),
val(Mid ({calllog.starttime},5,2)),
val(Mid ({calllog.starttime},7,2)),
val(Mid ({calllog.starttime},9,2)),
val(Mid ({calllog.starttime},11,2)),
val(Mid ({calllog.starttime},13,2))
);
DateTimeToSeconds (ax) - DateTimeToSeconds (bx)
the error is "a day number must be between 1 and the number of days in the month" it worked ok before i added the duplicate report.
thanks
Local dateTimeVar ax := DateTime(val(Mid ({calllog.stoptime},1,4)),
val(Mid ({calllog.stoptime},5,2)),
val(Mid ({calllog.stoptime},7,2)),
val(Mid ({calllog.stoptime},9,2)),
val(Mid ({calllog.stoptime},11,2)),
val(Mid ({calllog.stoptime},13,2))
);
Local dateTimeVar bx := DateTime(val(Mid ({calllog.starttime},1,4)),
val(Mid ({calllog.starttime},5,2)),
val(Mid ({calllog.starttime},7,2)),
val(Mid ({calllog.starttime},9,2)),
val(Mid ({calllog.starttime},11,2)),
val(Mid ({calllog.starttime},13,2))
);
DateTimeToSeconds (ax) - DateTimeToSeconds (bx)
the error is "a day number must be between 1 and the number of days in the month" it worked ok before i added the duplicate report.
thanks