Troubleshooting Advanced PDF code

Hi. I have the following bit of code in an advanced PDF (Multi Currency Statement):

<?xml version="1.0"?><!DOCTYPE pdf PUBLIC "-//" "report-1.1.dtd">

<pdfset><#if statements?has_content><#list statements as record>



<#assign earliestDate = "12/31/3000"?date("MM/dd/yyyy")> <!-- Assumes that no date in the list will be later than Dec 31 3000 -->

<#list record.lines as line>

<#if (line.datecol < earliestDate)>

<#assign earliestDate = line.datecol>



This is supposed to pick the earliest date from all of the dates in the list of activities for the statement

This returns the correct value though I cannot get it to display on the pdf’s header section (just underneath the company logo)

Instead it displays in a random part of the body of the pdf

Troubleshooting Advanced PDF code

How do I get this to display just underneath the company logo? if I use the ${record.earliestDate} field anywhere in the header, it does not display anything at all

Rookie Asked on June 11, 2021 in SuiteBuilder.
Add Comment
1 Answer(s)

You don’t want ${record.earliestdate} as it’s not a field that you’re accessing from the record – just use ${earliestDate} since it’s a variable you defined yourself. And to print it in the header, you need to put it in the part of the PDF code between <macro id=”nlheader”> and </macro> (should be near the top of the code).

Rookie Answered on June 11, 2021.

Thank you! That works

on June 11, 2021.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.
  • This site made possible by our sponsors:   Tipalti   Celigo   Become a Sponsor   Become a Sponsor