We find higher rank generalizations of the Razumov--Stroganov sum rules at
$q=-e^{i\pi\over k+1}$ for $A_{k-1}$ models with open boundaries, by
constructing polynomial solutions of level one boundary quantum
Knizhnik--Zamolodchikov equations for $U_q(\frak{sl}(k))$. The result takes the
form of a character of the symplectic group, that leads to a generalization of
the number of vertically symmetric alternating sign matrices. We also
investigate the other combinatorial point $q=-1$, presumably related to the
geometry of nilpotent matrix varieties.