According to reports on the web Tramadol, taken in larger doses than are usually prescribed can cause euphoria but Dilaudid or Hydromorphone appears to be more associated with that kind of effect. The Wikipedia page on hydromorphone specifically mentions that side effect (but does not mention euphoria on the Tramadol page):
A possible and likely side effect associated with hydromorphone is a very powerful euphoria, achieved dually through a perceived transition from a state of pain to a state of pain-relief, or through direct stimulation of the μ opioid receptor (μ1 and μ2) [of which hydromorphone, related to the morphine molecule, is a primary μ agonist].
Tramadol appears to effect a different receptor, which may or may not cause the same degree of euphoria. Perhaps some people with direct experience of the two drugs can provide some more data.