Hi, SalesLine will be null, while CRT is building header and footer fields.
As soon as CRT goes into 'Body' section building - SalesLine will have value. Make sure you put your SalesLine fields to Body section of the receipt and check 'if not null' condition in CRT