The exam class allows one to generate a gradetable that is dynamically generated depending on the number of questions, like so
\documentclass[addpoints,12pt]{exam}
\begin{document}
\multirowgradetable{1}[questions]
\begin{questions}
\question[10] First question
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\end{questions}
As this table is too wide, exam gives the option to display multiple tables instead:
\documentclass[addpoints,12pt]{exam}
\begin{document}
\multirowgradetable{2}[questions]
\begin{questions}
\question[10] First question
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\end{questions}
I want the number of tables to be dynamically generated, so that I have a table for each 10 exercises. I tried this using the calculator package:
\documentclass[addpoints,12pt]{exam}
\usepackage{calculator}
\begin{document}
\begin{questions}
\question[10] First question
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\question[10] Another
\end{questions}
\INTEGERDIVISION{\numquestions}{10}{\sola}{\solb}
\ADD{\sola}{1}{\numrows}
\multirowgradetable{\numrows}[questions]
\end{document}
This works as long I put the table at the end of the document. But I want it at the beginning. What can I do to achieve this?