thanks a lot !!!
Posts made by Maryna Sotnyk
-
RE: issue with conditional expression {{#if}}
I logged my request and I saw that my json is different. I pass bool but receive a string.
I send json { "property" : true} , but in my template arrived json { "property": "true"}.
I tried to solve called custom function , it't work but it is very inconvenient as I have to call it many times for so many checks.
Can You help me to find another way to convert string to a boolean in jsreportfunction strtobool(conditional, options) {
if(conditional == 'true') {
return options.fn(this);
}
} -
RE: issue with conditional expression {{#if}}
I used the same json in local jsreport playground and in var request data: { json }, but with different output pdf. I double chekhed all properties in json and they're present when I send it.
How I can verify which json actually arrives in server jsreport? -
issue with conditional expression {{#if}}
hi,
I have issues with conditional expression {{#if }}. On jsreport playground it's work well, but when I download phantom-pdf it conditional is ignored and show every time{{#if conditional_true}}
show div
{{/if}}$scope.Download= function () { var data = {my json} jsreport.serverUrl = 'http://localhost:5488'; var request = { template: { name: 'My_name', engine: 'handlebars', recipe: 'phantom-pdf' }, data: data }; jsreport.download('myReportName.pdf', request); }