In this device and the associated method, a connection unit that can be attached to an arm bearing an x-ray source and an x-ray receiver is fashioned such that said connection unit compensates for a pivot movement of the arm so that a compression unit arranged at the connection unit remains stationary during a pivot movement.