Micro Focus QTP (UFT) Forums
Parsing value to report - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Parsing value to report (/Thread-Parsing-value-to-report)



Parsing value to report - janriis - 04-20-2009

Hi all

I have the following code:

***quote ***
Code:
if val1=val2 Then
reporter.ReportEvent micPass,"Amount","Calculation ok"
    else
    reporter.ReportEvent micFail,"Amount", "Calculation wrong"
End if
***unquote***

val1's value is from the local dataTable and val2 is from a text field in my application.

Is it possible to have the value of val1 parsed to the report, so when a test is passed or failed, I am able to see the value of val2 ?


RE: Parsing value to report - dvkbabu - 04-21-2009

Using string concatenation operator you can pass the values to Report

Code:
If val1=val2 Then
reporter.ReportEvent  micPass,"Amount" ,"Calculation ok and the Values are-> " &val1 & " and " &val2
else
reporter.ReportEvent micFail,"Amount", "Calculation wrong and the Values are-> " &val1 & " and " &val2
End if

Vijay