I have Crystal 8.5. My report is grouped by Category, then item, then date. After the date grouping I have values. Value 2 is a memo field that is >250 characters. It is in the details section of the report. Value is a formula field that combines multiple values with a comma in the middle. The report displays one or the other, depending upon which one has data. Here is the problem:
There is a value time stamp that appears for each value or value 2. What I want is for each time the date of either one changes it shows date and time. Then just time until there is a date change. It has to be on the same line, with no space. For example:
3/1/05 0800 Value
0900 Value
1000 Value2
1100 Value
4/1/05 0800 Value2
0900 Value
I have it working for Value, but when value 2 shows up, it doesn't show the date. Here is the code I am using:
@ClearFooterAndDetailDates ---------------------------------- Header #1
shared datevar DetailDate;
shared datevar FooterDate;
DetailDate := CDate(0);
FooterDate := CDate(1);
@SetDetailWasPrintedFalse ---------------------------------- Header # 2
shared booleanvar DetailWasPrinted;
DetailWasPrinted := false;
@Section_Visibility ------------------------------------------------ Details
local booleanvar DontPrintThisDetail;
shared datevar DetailDate;
shared booleanvar DetailWasPrinted;
DontPrintThisDetail := ({@detailstringcode}) <> "";
DetailWasPrinted := Not(DontPrintThisDetail);
if DetailWasPrinted Then DetailDate := {@AuthoredDate};
DontPrintThisDetail;
@Valuetimestamp -------------------------------------------------- Details
shared datevar DateOfCurrentValue;
shared datevar DetailDate;
shared datevar FooterDate;
shared booleanvar DetailWasPrinted;
local stringvar TimestampResult;
if DetailWasPrinted Then
DateOfCurrentValue := DetailDate
Else
DateOfCurrentValue := FooterDate;
if DateOfCurrentValue <> {@AuthoredDate} Then
TimestampResult := {@AuthoredDate} & " " & {@TimeValue}
Else
TimestampResult := {@TimeValue};
TimestampResult;
@Valuetimestamp_footer ----------------------------------------- Footer #3
shared datevar FooterDate;
local stringvar Timestamp;
Timestamp := {@Valuetimestamp};
FooterDate := {@AuthoredDate};
TimeStamp;
Any help would be appreciated
Toni
There is a value time stamp that appears for each value or value 2. What I want is for each time the date of either one changes it shows date and time. Then just time until there is a date change. It has to be on the same line, with no space. For example:
3/1/05 0800 Value
0900 Value
1000 Value2
1100 Value
4/1/05 0800 Value2
0900 Value
I have it working for Value, but when value 2 shows up, it doesn't show the date. Here is the code I am using:
@ClearFooterAndDetailDates ---------------------------------- Header #1
shared datevar DetailDate;
shared datevar FooterDate;
DetailDate := CDate(0);
FooterDate := CDate(1);
@SetDetailWasPrintedFalse ---------------------------------- Header # 2
shared booleanvar DetailWasPrinted;
DetailWasPrinted := false;
@Section_Visibility ------------------------------------------------ Details
local booleanvar DontPrintThisDetail;
shared datevar DetailDate;
shared booleanvar DetailWasPrinted;
DontPrintThisDetail := ({@detailstringcode}) <> "";
DetailWasPrinted := Not(DontPrintThisDetail);
if DetailWasPrinted Then DetailDate := {@AuthoredDate};
DontPrintThisDetail;
@Valuetimestamp -------------------------------------------------- Details
shared datevar DateOfCurrentValue;
shared datevar DetailDate;
shared datevar FooterDate;
shared booleanvar DetailWasPrinted;
local stringvar TimestampResult;
if DetailWasPrinted Then
DateOfCurrentValue := DetailDate
Else
DateOfCurrentValue := FooterDate;
if DateOfCurrentValue <> {@AuthoredDate} Then
TimestampResult := {@AuthoredDate} & " " & {@TimeValue}
Else
TimestampResult := {@TimeValue};
TimestampResult;
@Valuetimestamp_footer ----------------------------------------- Footer #3
shared datevar FooterDate;
local stringvar Timestamp;
Timestamp := {@Valuetimestamp};
FooterDate := {@AuthoredDate};
TimeStamp;
Any help would be appreciated
Toni