The first application of a pnCCD detector for X-ray scattering experiments using white synchrotron radiation at BESSY II is presented. A Cd arachidate multilayer was investigated in reflection geometry within the energy range 7 keV < E < 35 keV. At fixed angle of incidence the two-dimensional diffraction pattern containing several multilayer Bragg peaks and respective diffuse-resonant Bragg sheets were observed. Since every pixel of the detector is able to determine the energy of every incoming photon with a resolution DeltaE/E approximately 10(-2), a three-dimensional dataset is finally obtained. In order to achieve this energy resolution the detector was operated in the so-called single-photon-counting mode. A full dataset was evaluated taking into account all photons recorded within 10(5) detector frames at a readout rate of 200 Hz. By representing the data in reciprocal-space coordinates, it becomes obvious that this experiment with the pnCCD detector provides the same information as that obtained by combining a large number of monochromatic scattering experiments using conventional area detectors.