I'm trying to add some code when generating a report with the js viewer.
I have a text field in my report which contains data from a column in a database table. In this case, the column has integer values, but they represent three possible states of a document. I have a function in my own JS library that translates these values into readable text, for example 0 equals "Ready" while 1 equals "Processed".
In order to use my function to "translate" those integer values into text, I need to access the text component, but not the pre-render instance.
Code: Select all
var text=viewer.report.getComponents().getByName("StateText");
I also have another question.
Code: Select all
report.dictionary.variables.list
Thanks in advance.