#1 2020-11-10 09:12:35

unsi_2
Member
Registered: 2020-06-24

report executor of template

hi

i am trying to execute a dynamic list report in a script in a template format, how should i specify that here?:

def xls = reportExec.execute(report, "EXCEL")

kind regards

Offline

#2 2020-11-11 13:07:45

eduardo
Administrator
Registered: 2016-11-01
Website

Re: report executor of template

Hi unsi_2,

as you can have more than one JXLS template in a dynamic list, you have to put the id of the template. You can of course check programmatically if the dynamic list has only one template, and if so, you can set this id automatically.
E.g.:

import import net.datenwerke.rs.tabletemplate.service.tabletemplate.config.RECTableTemplate

def templateId = 1234
/* Template configuration */
def templateConfig = new RECTableTemplate()
templateConfig.setTemplateId(templateId);
def compiledReport = reportExec.execute report, "TABLE_TEMPLATE", templateConfig

Regards,
Eduardo

Offline

#3 2020-11-11 17:59:21

unsi_2
Member
Registered: 2020-06-24

Re: report executor of template

many thanks Eduardo.

i have come across to config.setSelectFormat(true); that make  is easier by letting the user select the desired format.

Offline

Board footer

Powered by FluxBB