How do I add a start and end date to my paginated report?

I have a text box that I’ve added to a paginated report, and I want to include the start and end date of the report data in it. I have a “StartDate” and “EndDate” parameter set up, but when I include this in the text box as $StartDate and $EndDate, it turns into a series of numbers when exported to PDF (almost like a timestamp). This makes it unreadable.

I tried to add formatting to the parameters, like so:

formatDate($StartDate,‘dd MMM yyyy’)

But it doesn’t seem to like having a parameter passed in as a value to a function. If I replace $StartDate with now(), it’ll show the current date as expected, but adding in the parameter breaks it.

How can I show the start and end date of my report in a reliable way, formatted to my choosing?

formatDate(${StartDate},‘dd MMM yyyy’)

Parameters work like that ^ is that what you are trying to do?

Also have you tried converting it to a string?

toString(formatDate(${StartDate},‘dd MMM yyyy’))

Sorry, yes, I made a typo in my original post. That’s exactly what I’ve entered and when I click Save it just reverts as if I never entered anything.

Converting to a string also doesn’t work. I’ve uploaded a video to show it.

So it only errors when you export it to a PDF?

It must be an error with that functionality then. I would look to open up a support case.

Here are the steps to open a support case. If your company has someone who manages your AWS account, you might not have direct access to AWS Support and will need to raise an internal ticket to your IT team or whomever manages your AWS account. They should be able to open an AWS Support case on your behalf. Hope this helps!

Hi @hal9000, Please see this link: Date parameter in text box - download issue The post has a solution to the same issue with a work around.

1 Like