That is because that has not been invented yet. Well if you mean this. Send Magikarp in battle against Hypno. Withdraw Magikarp and send out Dragonite. Dragonite beats Hypno. Dragonite recieved 836 EXP. Magikarp gained 0 EXP....
I am sure I had the same problem before. But that technique has not been inserted into the game. if you are training Magikarp I guess you have to get lucky. well good luck....