I have referred to v01d's solution and just made a complete and properly framed answer for anyone else who might come across the same question.
Setting the Environment Variable:
- Goto MyComputer, right click and click on Properties.
- Click on the Advanced Tab, and click on Environment Variables.
Click to Add a new variable and set the properties in the following way:
Restart your MSVC++ and run your program again. You should be able to find your XML Report in the corresponding folder as mentioned in the 'Value' property specified by you. Furthermore, you can even convert the xml report with the help of Microsoft Access into a particular choice of format you want. Just a simple tutorial/example of this is given here: XML Conversion.
Hope this helps!