Nonlinear solitary structures are studied in an inhomogeneous magnetized plasma having trapped electrons and dust grains of different polarity. Only compressive structures (density/potential hill) are found to exist that evolve due to the propagation of two types of waves, namely fast wave and slow wave. The fast wave always propagates in the plasma but the slow wave can propagate when the wave propagation angle theta satisfies the condition theta >= tan(-1) {[root(1 + 2T(i)/T-eff) - [(alpha n(d0)Z(d))/(n(e10) + n(eh0))] - v(0)]/u(0)}, where n(e10) (n(eh0)) and n(d0) are the densities of the trapped (isothermal) electrons and the dust grains with Z(d) as their charge number, T-i (T-eff) is the ion (effective) temperature, v(0) (u(0)) is z- (x-) component of the ion flow velocity and alpha is + 1 (-1) for the positively (negatively) charged dust grain. Both the waves evolve as solitary structures when theta > tan(-1) root lambda(sigma) (lambda(sigma) + v(0))/[2T(i)/T-eff + 1/(n(e10) + n(eh0))], where lambda(sigma) = +/- root[(1 + 2T(i)/T-eff) - (alpha n(d0)Z(d))/(n(e10) + n(eh0))]. The effects of dust grain density, dust polarity, ion temperature, obliqueness, magnetic field, density of trapped electrons, etc. are examined on these solitary structures.