Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everyone,
I am trying to eliminate html codes from my data using stripHTML function. I am using the below macro for the same,
Function stripHTML(strHTML)
'Strips the HTML tags from strHTML
Dim objRegExp, strOutput
Set objRegExp = New Regexp
objRegExp.IgnoreCase = True
objRegExp.Global = True
objRegExp.Pattern = "(?:<style.+?>.+?</style>|<script.+?>.+?</script>|<(?:!|/?[a-zA-Z]+).*?/?>)"
'Replace all HTML tag matches with the empty string
strOutput = objRegExp.Replace(strHTML, "")
'Replace all < and > with < and >
strOutput = Replace(strOutput, "<", "<")
strOutput = Replace(strOutput, ">", ">")
stripHTML = strOutput 'Return the value of strOutput
Set objRegExp = Nothing
End Function
The issue is, when I reload the report locally in my server, the report executes without any errors, but when reloaded on QMC, I get the below error
Any guesses what could be the possible reason for this?
Thank you.
I have a hunch I know what the issue is, believe it should be that the QlikViewBatch Settings.ini is missing the following setting:
AllowMacroFunctionsInExpressions
That would need to have an =1 to be activated there. The setting will not be there, you will have to manually add it as follows within the [Settings 7] area:
AllowMacroFunctionsInExpressions=1
I believe that should get things working when you run it via Publisher/Reload Engine task. Hopefully this does the trick, I believe you should have had to have changed this in the client settings as well though, so I am a bit puzzled there! 🙂
Regards,
Brett
PS, helps if I remember to give you the path to the Settings.ini! 🙂 Sorry about that:
C:\Windows\System32\config\systemprofile\AppData\Roaming\QlikTech\QlikViewBatch\