The design of a multichannel fiber Bragg grating to compensate simultaneously the fiber dispersion and dispersion slope is proposed and analyzed. It is found that constituent gratings with equal length would result in unequal channel bandwidth and large band edge sidelobes in broad bandwidth channels due to large dispersion slope. To overcome these short-comings, we propose a new design procedure in that both the physical length and apodization function of the constituent gratings be allowed to vary. This results in a multichannel grating with equal bandwidth and negligible band edge sidelobes. Of course, this grating compensates both the fiber dispersion and dispersion slope very well.