You are not logged in.
Pages: 1
Topic closed
Hello again !
I would like to know if there is any way to remove special character from report parameters before displaying it to users ?
Thanks in advance.
Jean-Marie
Offline
Hi Jean-Marie,
I am not quite sure I completely get what you mean. Could you give an example?
Regards
Arno
Offline
Hello,
I'm a fetching the values for the report parameters with an SQL-Query, but the values sometimes include special characters like html tag
For example : <p> Build for OS W7 and Navigator Chrome</p>
In BIRT Report Design you can choose to display the text with html tag interpretation (using Dynamic Text).
I don't need the interpretation of the tags but the removal of the tag.
Jean-Marie
Offline
Hi Jean-Marie,
you can do this using the post-processing option of the datasource parameter.
If you open the properties of a datasource parameter, under "Specific Properties" you can enter a expression, that transforms your parameter data.
The expression is interpreted as a groovy script and it can access the original parameter values as a two-dimensional array called data. The modified array has to be returned and replaces the original data.
A simple way to strip all tags would be to use
data*.replaceAll("\\<.*?>","")
as a post-processing expression (*. is groovy syntax which applies the function to all elements of the array)
Hope that helps,
Thorsten
Pages: 1
Topic closed