I am developing a script report in version 12 to send statements to clients based on the general ledger report.
Currently, the execute function returns only columns and results
def execute(filters=None):
...
return columns, res
I need to send additional information
def execute(filters=None):
...
data_to_be_printed = get_customer_details(filters.party)
...
return columns, res, None, None, data_to_be_printed
It appears as if the last parameter will appear as “data_to_be_printed”. The following posts allude to this.
The resulting JSON is indeed showing the field
{
"JSON":{
"message":{
"result":[
{
.....
},
],
"columns":[
{
.....
},
],
"message":"hello",
"chart":"",
"data_to_be_printed": "Data 1",
"status":null,
"execution_time":0,
"add_total_row":0
}
In my html report, I tried to print, without success.
I even tried setting and accessing the variable as an array, but it appears I cannot access the “data_to_be_printed” in the HTML report.
<div>
[[ {%= this.data_to_be_printed %} ]]<br>
[[ {%= data_to_be_printed %} ]]<br>
</div>
Any ideas where I could be going wrong?