Formula in kreporter

Hi,

I have json string, and i tried use json_decode function in formula in kreporter, and seem it didn’t worked
Is kreporter support json function in formula or not?

Thanks

It won’t. A json_decode will return an object or an array. You need a string to display anyway, don’t you?
Workaournd:
Create a function in custom/include/custom_utils.php in which you make a readable string of your json data.
Then call the function in formula and pass the field (stored variable in manipulate) to your function.
That shall do the trick.
AdvFormulaJsonDecode01

Thanks maretval
It worked for me
About reason we can’t use json_decode($jsonString) because on kreporter it use htmlentities for convert jsonString to html code, we can use directly as json_decode(html_entity_decode($jsonString))
But your suggest better for handler exception