# ! Undefined control sequence

I am getting an ! Undefined control sequence error when compiling the following code:

\documentclass[11pt,table,a5paper]{article}
\usepackage{array,ragged2e}
\usepackage{graphicx}
\usepackage[framemethod=TikZ]{mdframed}
\usepackage{lipsum}
\usepackage{ifthen}
\usepackage{wrapfig}
\usepackage{comment}
\usepackage{parskip}
\usepackage{framed}
\usepackage{sidecap}
\usepackage{longtable}
\begin{document}
\begin{longtable}{|p{2.7cm}|p{1.0cm}|p{2.4cm}|p{1.0cm}|p{1.3cm}|p{0.8cm}|}
\hline
\rowcolor{white} \textbf{ \textcolor{white}{A}} &\textbf{ \textcolor{white}{B}} &\textbf{ \textcolor{white}{C}}  &\textbf{ \textcolor{white}{D}} &\textbf{    \textcolor{white}{E}} &\textbf{ \textcolor{white}{P}} \\
\rowcolor{white} \textbf{ \textcolor{white}{A}} &\textbf{ \textcolor{white}{B}} &\textbf{ \textcolor{white}{C}}  &\textbf{ \textcolor{white}{D}} &\textbf{    \textcolor{white}{E}} &\textbf{ \textcolor{white}{P}} \\
\hline
\newcommand{\dsr}{\rule[-3.5cm]{0pt}{4cm}}
\dsr  XXXXXXX  & \dsr  3.38&  \multirow{1}{*}{\parbox{2.5cm}  {\textcolor{black}{XXXXXXX >2,~\\
~\\
XXXXXXX~\\
~\\
XXXXXy XXXXX XXXXX XXXXX}}}
&\dsr 2.36\% & \dsr 0.62\% & \dsr 18 \\\cline{1-2} \cline{4-6}
\hline
\end{longtable}}
\end{document}


How to fix this issue?

• Welcome to TeX.SX! Usually, we don't put a greeting or a “thank you” in our posts. While this might seem strange at first, it is not a sign of lack of politeness, but rather part of our trying to keep everything very concise. Accepting and upvoting answers is the preferred way here to say “thank you” to users who helped you. – jub0bs Aug 22 '13 at 4:01
• A general programming hint: Define the macro \newcommand{\ttw}[1]{\textbf{ \textcolor{white}{#1}}} in the preamble, and then set up the column header items as \ttw{A}, \ttw{B}, etc. Much easier to read and to debug... – Mico Aug 22 '13 at 5:01

Moving the definition of \dsr command to before \begin{longtable} and adding \usepackage{multirow} in the preamble seem to solve the problem.