Micro Focus QTP (UFT) Forums
how to call reporter event through function - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners)
+--- Thread: how to call reporter event through function (/Thread-how-to-call-reporter-event-through-function)



how to call reporter event through function - upadhyay40 - 11-09-2009

Hello all,

Hi i want to export whole result i was created into excel, i did it , for that i was written a function, writeresults(status,efunctionality, edescription), so when i call this function like

WriteResults Reporter.ReportEvent micFail, "Custom Step", "The user-defined step failed."

It shows user undefined argument error can you please help me out

Thanks


RE: how to call reporter event through function - manabh - 11-09-2009

Hi,
Your call statement is wrong.
You will need to call it like:
Code:
WriteResults micFail, "something", "something"

And again in WriteResults function, you need to call Reporter.ReportEvent statement.
Code:
Reporter.ReportEvent status, efunctionality, edescription



RE: how to call reporter event through function - upadhyay40 - 11-09-2009

Thanks a lot mannav, can you please let me know how to export that datasheet and save on c:\ drive with all result.