Generating PDF from non-persistent table like action type excel

I have a page where search result is displayed after entering a few criteria such as start date, end date and account ID. The query is done via middleware SQL and the search result is populated into a Grouptable using a non-persistent entity.

Now I have no problem exporting the result as Excel using <action id="excel" type="excel"/>, however there is no built-in functionality to do the same for PDF.

From what I’ve gathered, I will need the reporting add-on to export PDF files. However, it seems like the report generator requires a persistent entity if I were to use its wizard to create report. I also notice there’s SQL query in the Report documentation but how do I make use of my query which already run during the search itself?

You can pass your prepared data to the report via a parameter, and use this parameter in a Groovy dataset.

1 Like

Hi @krivopustov it’s working with Groovy.

However, I have LocalDateTime value which is displaying in UI as 06/01/2022 19:48 for example, but in the report it is showing 2022-01-06T19:48:12

I tried to use Field Value Format as show in Formatters but it is not working. My band is Root > Data and I have added value name as and format string as dd/MM/yyy HH:mm but it doesn’t alter the data generated in the report.