[Tex/LaTex] Latex Error: File ended while scanning use of \Gscale@box

r

I'm having trouble locating the source of this error.

Overview_page1 (passed to FormattedTable), is currently a character of length 33- after running my code, it becomes a 3×11 table. However, when I pass another column to the table and change "SSS" to "SSSS", I get the following error when I try to run my code:

LaTeX errors:

! File ended while scanning use of \Gscale@box
I suspect you have forgotten a `}', causing me
to read past where you wanted me to stop.

I don't change anything except the length of Overview_page1, so I don't know what bracket is missing. This is the output I get from FormattedTable with the 33 length list:

\scalebox{1}{
\begin{tabular}{lcc}
  \rowcolor[rgb]{0,0.173,0.3255}\textcolor{white}{} & \textcolor{white}{FY2017} & \textcolor{white}{FY2016} \\ 
  \rowcolor[rgb]{0.87451,0.90588,0.96078} Total & 1 & 5 \\ 
  Notion & 40 & 10 \\ 
Etc.
  \end{tabular}
}

And this is the 44 length list:

\scalebox{1}{
\begin{tabular}{lccc}
  \rowcolor[rgb]{0,0.173,0.3255}\textcolor{white}{} & \textcolor{white}{FY2017} & \textcolor{white}{FY2016} & \textcolor{white}{Change} \\ 
  \rowcolor[rgb]{0.87451,0.90588,0.96078}Total & 1 & 5 & 6 \\ 
  Notion & 40 & 10 & 6 \\ 
Etc.
  \end{tabular}
}

Thank you for your help! Code posted below.

\chapter*{Analysis}
\textsc{\LARGE{Summary
\let\thefootnote\relax\footnotetext{}\let\thefootnote\relax\footnotetext{
}}}

\vspace{2mm}
\begin{center}

<<capValue1, echo = FALSE, results = 'asis', include=TRUE>>=
cat(Caption2(paste(CaptionCount,". Overview",sep=""),"Comparison",TextWidth="18.5cm"))
CaptionCount=CaptionCount+1;
@

<<fig1-1,fig.width=20, fig.height=15, out.width='\\linewidth', echo = FALSE, results = 'asis', warning=FALSE, error=FALSE, fig.align='right'>>=
FormattedTable(Overview_page1,"SSS",Title=TRUE,Total=FALSE,ROWNAMES=FALSE,Size=1,AlignmentOveride=NULL)
@

\end{center}
\pagebreak 

Best Answer

enter image description here

\documentclass{article}

\usepackage{colortbl,graphicx,tikz}
\definecolor{X}{rgb}{.5,.5,.5}
\begin{document}

\begin{center}
\tikz
\draw (0,0)node[rectangle, minimum height = 0.5 cm, minimum width = \linewidth ,
fill = X, text width = 18.5cm , align = left] 
{\textcolor{white}{ 1. Overview \\*
\scriptsize{ Comparison }}};
\scalebox{1}{ 
\begin{tabular}{lccc} 
\rowcolor[rgb]{0,0.173,0.3255}\textcolor{white}{} & 
\textcolor{white}{FY2017} & \textcolor{white}{FY2016} &
%NO!!!!!\textcolor{white}{% Change}
\textcolor{white}{\% Change} 
\\ \rowcolor[rgb]{0.87451,0.90588,0.96078}Total & 1 & 5 & -6\% \\
 Total & 4 & 1 & -6\% \\ \end{tabular} }
 \end{center} \pagebreak 
\end{document}

You need to use \% to get % as it is you have commented out one }