  We study the resonant x-ray scattering (RXS) spectra at the Dy $L_{\rm III}$
absorption edge in the quadrupole ordering phase of DyB$_2$C$_2$. Analyzing the
buckling of sheets of B and C atoms, we construct an effective model that the
crystal field is acting on the $5d$ and $4f$ states with the principal axes
different for different sublattices. Treating the $5d$ states as a band and the
$4f$ states as localized states, we calculate the spectra within the dipole
transition. We take account of processes that (1) the lattice distortion
directly modulates the $5d$ states and (2) the charge anisotropy of the
quadrupole ordering $4f$ states modulates the $5d$ states through the $5d$-$4f$
Coulomb interaction. Both processes give rise to the RXS intensities on
$(00\frac{\ell}{2})$ and $(h0\frac{\ell}{2})$ spots. Both give similar
photon-energy dependences and the same azimuthal-angle dependences for the main
peak, in agreement with the experiment. The first process is found to give the
intensities much larger than the second one in a wide parameter range of
crystal field. This suggests that the main-peak of the RXS spectra is not a
direct reflection of the quadrupole order but mainly controlled by the lattice
distortion.
