Exporting UFT 12 results into html throws the error about 'IDS_BC'

Exporting UFT 12 results into html throws the error “A reference to variable or parameter ‘IDS_BC’ cannot be resolved.”

I have recently upgraded from QTP 11 to UFT 12. The vbscript I used for QTP 11 worked great, but it is not running with UFT 12.

Export Error

Export report code:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Public Function ApplyXSL(ByVal inputXML, ByVal inputXSL, ByVal outputFile)
sXMLLib = "MSXML.DOMDocument"
Set xmlDoc = CreateObject(sXMLLib)
Set xslDoc = CreateObject(sXMLLib)

xmlDoc.async = False
xslDoc.async = False

xslDoc.load inputXSL
xmlDoc.load inputXML

outputText = xmlDoc.transformNode(xslDoc.documentElement)
outputText=replace(outputText,"UTF-16","gb2312")
Set FSO = CreateObject("Scripting.FileSystemObject")

Set outFile = FSO.CreateTextFile(outputFile,True)
outFile.Write outputText
outFile.Close

Set outFile = Nothing
Set FSO = Nothing
Set xmlDoc = Nothing
Set xslDoc = Nothing
Set xmlResults = Nothing

End Function

Solution:

  1. please go to QTP installation folder. E.g., C:\Program Files\HP\QuickTest Professional\dat
  2. Open the “PShort.xsl” file, uncomment the below line

I believe you can get the correct result now:)

唐胡璐 wechat
欢迎您扫一扫上面的微信公众号,订阅我的博客!
分享创造价值,您的支持将鼓励我继续前行!