if you are attaching your search result using the ...
# advancedpdf
s
if you are attaching your search result using the name SAMPLE, then in your template, you have to reference it as: <#list SAMPLE as result> ${result.custrecord_l_item} </#list>