Well appernetly you can use the whole autosuggestion stuff to tell yourself to wake up immediately after you dream. But what I did was set my alarm to a certain number of hours after I went to bed and kept reducing the number of hours, until I woke up during a dream or without having one.
Ah, I explained that kinda bad, but it makes sense