06-11-2015 12:47 AM
Hello,
I want to add some text in the reportheader.
I enabled "themodifyreportheader" callback and then I want to add extra text in the "parameters.reportheader".
What is the easiest way to add a string, for example " into the existing "parameters.reportheader"?
<tr><td class='hdr_name'><b>Product name: </b></td><td class='hdr_value'><b>MDU special</b></td></tr>
gr,
Bart
06-11-2015 08:13 AM
What kind of report are you generating? HTML, XML, Text etc...?
You can use the Find() function and the Replace() function to accomplish what you want. It all depends on where you want to insert it in the header.
Replace(String string, Number startIndex, Number numCharsToReplace, String replacementString)
Find(String string, String stringToSearchFor, Number indexToSearchFrom = 0, Boolean ignoreCase = False, Boolean searchInReverse = False)
Use the Find function to determine the startIndex in the Replace function. Set the numCharsToReplace to 0.
Hope this helps,
06-11-2015 11:52 PM
Hi Jiggawax,
Thank you for your reply.
I was hoping for a more elegant sollution.
I now use the Split() function, set the delimiter to "\n".
Next I can insert a string between any row.
This is all put in a sub sequence.
gr,
Bart