Hi, Martin
I beleive it's not possible to find out the correct document in your case - report engine does indicate relation and insert hyperlink basing on EDT only (I didn't make it incicating menu item directly for report's control)
But I beleive your problem can be solved. All you need is just modify your report and introduce 2 display method for 2 types of orders. The return type for one method should be PurchId, for second - ProdId. But it's like having 2 separate colums in your report. You can play a litte bit with report design to mimimise the difference.