I thought of avoiding ComputerName() as the folder path breaks if you open the document in client system.
But looks like there is no alternate. I am just hardcoding folderpath to point test server if the document is opened in client system. That way my main issue resolved (i could migrate documents whichout any code change from test to production server).
It works fine if we open the document by giving full address (like \\xyz\abc\test.qvw) But if we open from mapped directory QvWorkPath value is E:\\abc\test.qvw)
Does the server have accessible E:\abc\test.qvw ? Maybe obvious but, when using UNC paths, you don't necessarily refer to actual paths, but to shared drives, so you will have to check that either. I've been testing and loading from network drives works well. Check that the correspondence (in the server) between the UNC path and the network drive is working fine.
In your example above, assuming that "xyz" is your server name and "abc" the name of the shared folder, the right path could be E:\test.qvw (if E: is mapped to \\xyz\abc)