Date not printing on the first Print. Reprint printing the data..

Date field is not printing on the first print and its print on the reprint.
I need to print the date on the first print itself. Kindly assist.
Report Code: The below code will assign current date value to “License Reprint Order Line”.“Date to Publisher”.
License Reprint Order Line - OnPostDataItem()
IF NOT CurrReport.PREVIEW THEN BEGIN
“License Reprint Order Line”.SETFILTER(“License Reprint Order Line”.“Date to Publisher”,FORMAT(0D));
IF “License Reprint Order Line”.FIND(’-’) THEN BEGIN
“License Reprint Order Line”.MODIFYALL(“Date to Publisher”,TODAY);
END;
END;
Section Report: the textbox is assigned the field “License Reprint Order Line”.“Date to Publisher” to display the date.

License Reprint Order Line, Body(1)
“License Reprint Order Line”.“Date to Publisher” (textbox field)

Kindly assist.

Hi Dee,

Try the following,

Remove the Code from the ‘License Reprint Order Line - OnPostDataItem()’ and Insert the follwing piece of code in the

License Reprint Order Line - OnAftergetrecord()

IF NOT CurrReport.PREVIEW THEN BEGIN

IF “License Reprint Order Line”.“Date to Publisher”=0D THEN

“License Reprint Order Line”.“Date to Publisher” := TODAY;

“License Reprint Order Line”.MODIFY;

END;

Hope this helps,

Rgds,

Sid

Thanks Sid.

Its working fine now :)…

u r welcome