Read the form 4797 carefully ... not all the gains on it are capital that end up on the Sch D.
Thanks Critter-3....