1

Trying to enter large amount of text in a multirow cell. when it reaches a certain size the cell is not expanded and continues below cell outside the borders of the cell. anyway to fix this? thanks!

\documentclass{article}

%%%%%%%%%%%%%%%%%%%%%%
% Package Inclusions %
%%%%%%%%%%%%%%%%%%%%%%

\usepackage{tabu}
\usepackage{longtable}
\usepackage{seqsplit}
\usepackage{geometry}
\usepackage{pdflscape}
\usepackage{xparse}
\usepackage{array}
\usepackage{xstring}
\usepackage{amssymb,amsfonts,textcomp}
\usepackage{multirow}
\usepackage[table]{xcolor}
\usepackage{fancyhdr} %used for footers
\usepackage[absolute]{textpos}
\usepackage{lipsum}
\usepackage{lastpage}

%used to print Spanish characters in the text
\usepackage[utf8]{inputenc}
\usepackage{amssymb}
\usepackage[english,spanish]{babel}

%%%%%%%%%%%%%%%%%%%%%%
%   Configurations   %
%%%%%%%%%%%%%%%%%%%%%%

\geometry{
      top=0.50in,            
      inner=0.75in,
      outer=0.75in,
      bottom=0.50in,
      headheight=3ex,      
      headsep=6ex,          
    }

\setlength{\LTpre}{1pt} % removes the white space before a long table
\setlength{\LTpost}{1pt} % removes the white space after a long table
\newcommand{\wrapnum}[1]{\seqsplit{#1}}
\tabulinesep=1mm

\ExplSyntaxOn
    \NewDocumentCommand{\separator}{ }
     {
      \mode_if_math:TF { \allowbreak } { \- }
     }
    \NewDocumentCommand{\wrap}{ m }
     {
      \mathers_wrap:n { #1 }
     }

    \seq_new:N \l_mathers_input_seq
    \seq_new:N \l_mathers_output_seq
    \seq_new:N \l_mathers_temp_seq

    \cs_new_protected:Npn \mathers_wrap:n #1
     {
      \seq_clear:N \l_mathers_output_seq
      \seq_set_split:Nnn \l_mathers_input_seq { ~ } { #1 }
      \seq_map_inline:Nn \l_mathers_input_seq
       {
        \seq_set_split:Nnn \l_mathers_temp_seq { } { ##1 }
        \seq_put_right:Nx \l_mathers_output_seq
         { \seq_use:Nn \l_mathers_temp_seq { \separator } }
       }
      \seq_use:Nn \l_mathers_output_seq { ~ }
     }
\ExplSyntaxOff

%used to page break properly when using multirow and cline (hline wont work you must use cline)
\makeatletter
\def\@cline#1-#2\@nil{%
  \omit
  \@multicnt#1%
  \advance\@multispan\m@ne
  \ifnum\@multicnt=\@ne\@firstofone{&\omit}\fi
  \@multicnt#2%
  \advance\@multicnt-#1%
  \advance\@multispan\@ne
  \leaders\hrule\@height\arrayrulewidth\hfill
  \cr
  \noalign{\nobreak\vskip-\arrayrulewidth}}
\makeatother

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%   Titles, Headers and Footers   %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\pagestyle{fancy}
\fancyhead{}
\fancyfoot{}
\fancyfoot[RO]{Page \thepage\ of \pageref{LastPage}}
\fancyfoot[RE]{Page \thepage\ of \pageref{LastPage}}
\renewcommand{\headrulewidth}{0pt}

 % allow footer to be rotated during landscape mode
\fancypagestyle{lscape}{%
    \fancyhf{}
    \fancyfoot[RE]{
    \begin{textblock}{20}(1,5){\rotatebox{90}{}}\end{textblock}
    \begin{textblock}{1}(13,10.5){\rotatebox{90}{Page \thepage\ of \pageref{LastPage}}}\end{textblock}}
    \fancyfoot[RO] {
    \begin{textblock}{1}(19.75,3.5){\rotatebox{90}{Page \thepage\ of \pageref{LastPage}}}\end{textblock}
    \begin{textblock}{20}(1,13.25){\rotatebox{90}{}}\end{textblock}}

    \setlength{\TPHorizModule}{28pt}
    \setlength{\TPVertModule}{14pt}
    \renewcommand{\headrulewidth}{0.0pt}
    \renewcommand{\footrulewidth}{0.0pt}
    }

%%%%%%%%%%%%%%%%%%%%%%
% Start Report       %
%%%%%%%%%%%%%%%%%%%%%%

\begin{document}
\begin{landscape}
\thispagestyle{lscape}
\pagestyle{lscape}

\small

\begin{longtabu} to 9.5in {
    X[3,l,m]
    X[1,l,m]
    X[1,l,m]
}
    \Large\textbf{Report} &
    \Large\textbf{Job Number:} &
    \Large\textbf{32423432} 
\end{longtabu}

\begin{longtabu} to 9.5in {
    |X[1.5,l,m]|
    X[4,l,m]|
    X[2.5,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[2,l,m]|
    X[3,l,m]|
    X[2,l,m]|
    X[8,l,m]|
    }
    \hline

    \multicolumn{4}{|l|}{\textbf{Customer Name:}} &
    \multicolumn{5}{l|}{\textbf{Well Name:}} &
    \multicolumn{1}{l|}{\textbf{Job Date:}}

    \\

    \multicolumn{4}{|l|}{\parbox{3in}{\wrap{}}} &
    \multicolumn{5}{l|}{\parbox{4in}{\wrap{}}} &
    \multicolumn{1}{l|}{22/08/2014}


    \\\hline

    \multicolumn{4}{|l|}{\textbf{Customer Representative:}} &
    \multicolumn{3}{l|}{\textbf{County/Parish:}} &
    \multicolumn{2}{l|}{\textbf{State:}} &
    \multicolumn{1}{l|}{\textbf{Job Category:}}

    \\\cline{5-9}

    \multicolumn{4}{|l|}{\parbox{3in}{\wrap{Health}}} &
    \multicolumn{3}{c|}{\parbox{1.7in}{\centering\wrap{}}} &
    \multicolumn{2}{c|}{\parbox{1.9in}{\centering\wrap{}}} &
    \multicolumn{1}{l|}{\parbox{2.2in}{\wrap{}}}    

    \\\hline \hline

    \multicolumn{10}{|l|}{\cellcolor{blue!60}\large\textbf{}}

    \\\hline

    \textbf{CTU} &
    \multicolumn{2}{l|}{ 324234} &
    \multicolumn{2}{l|}{\textbf{CT Supervisor}} &
    \multicolumn{5}{l|}{ test test}

    \\\hline

    \textbf{MD} &
    \multicolumn{2}{l|}{ 324234} &
    \multicolumn{2}{l|}{\textbf{Casing Size In}} &
    \multicolumn{1}{l|}{32432}  &
    \multicolumn{1}{l|}{\textbf{Kick Off}}  &
    \multicolumn{1}{l|}{342}    &
    \multicolumn{1}{l|}{\textbf{30 deg}}    &
    \multicolumn{1}{l|}{32} 

    \\\hline

    \textbf{TVD} &
    \multicolumn{2}{l|}{ 324234} &
    \multicolumn{2}{l|}{\textbf{Casing Weight lb/ft}} &
    \multicolumn{1}{l|}{32432}  &
    \multicolumn{1}{l|}{\textbf{60 deg}}    &
    \multicolumn{1}{l|}{342}    &
    \multicolumn{1}{l|}{\textbf{90 deg}}    &
    \multicolumn{1}{l|}{32} 

    \\\hline

    \multicolumn{3}{|l|}{} &
    \multicolumn{2}{l|}{\textbf{Casing Cap bbl}} &
    \multicolumn{1}{l|}{32432}  &
    \multicolumn{1}{l|}{\textbf{CT Cap}}    &
    \multicolumn{1}{l|}{342}    &
    \multicolumn{1}{l|}{\textbf{CT AV}} &
    \multicolumn{1}{l|}{32} 

    \\\hline

    \multicolumn{2}{|l|}{\textbf{Min. ID In Well}} &    
    \multicolumn{3}{l|}{23423423423423} &
    \multicolumn{2}{l|}{\textbf{Restriction Type}} &
    \multicolumn{3}{l|}{The type} 

    \\\hline

    \multicolumn{10}{l}{}

    \\[-1ex]\hline

    \multicolumn{1}{|c|}{\multirow{3}{*}{\centering\textbf{Time}}} &
    \multicolumn{1}{c|} {\multirow{3}{*}{\centering\textbf{Activity Name}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Tubing Depth}}} &
    \multicolumn{2}{c|}{\centering\textbf{Pressure}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Tubing Weight}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Liquid Rate}}}&
    \multicolumn{1}{c|}{\multirow{2}{3cm}{\centering\textbf{Flow Black Rate / Liquid Type}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{N2 Rate}}}&
    \multicolumn{1}{c|}{\multirow{3}{*}{\centering\textbf{Activity Info}}} \\\cline{4-5}

    & & & 
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{Circulation}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{Wellhead}} &
    & & & & \\\cline{3-9}

    & &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{Start/End}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(psi)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(psi)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(lbs)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(bbl/min)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(bbl)/Name}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(SCF/min)}} & 

    \\\hline \hline \hline \hline

    \endfirsthead

    \hline

    \multicolumn{4}{|l|}{\textbf{Customer Name:}} &
    \multicolumn{5}{l|}{\textbf{Well Name:}} &
    \multicolumn{1}{l|}{\textbf{Job Date:}}

    \\

    \multicolumn{4}{|l|}{\parbox{3in}{\wrap{Ecana}}} &
    \multicolumn{5}{l|}{\parbox{4in}{\wrap{Dromgoole A4H 8-28-14}}} &
    \multicolumn{1}{l|}{22/08/2014}


    \\\hline

    \multicolumn{4}{|l|}{\textbf{Customer Representative:}} &
    \multicolumn{3}{l|}{\textbf{County/Parish:}} &
    \multicolumn{2}{l|}{\textbf{State:}} &
    \multicolumn{1}{l|}{\textbf{Job Category:}}

    \\\cline{5-9}

    \multicolumn{4}{|l|}{\parbox{3in}{\wrap{Health}}} &
    \multicolumn{3}{c|}{\parbox{1.7in}{\centering\wrap{Jim Wells}}} &
    \multicolumn{2}{c|}{\parbox{1.9in}{\centering\wrap{Texas}}} &
    \multicolumn{1}{l|}{\parbox{2.2in}{\wrap{Wash Fill/Sand Removal}}}  

    \\\hline

    \multicolumn{10}{l}{}

    \\[-1ex]\hline

    \multicolumn{1}{|c|}{\multirow{3}{*}{\centering\textbf{Time}}} &
    \multicolumn{1}{c|} {\multirow{3}{*}{\centering\textbf{Activity Name}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Tubing Depth}}} &
    \multicolumn{2}{c|}{\centering\textbf{Pressure}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Tubing Weight}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{Liquid Rate}}}&
    \multicolumn{1}{c|}{\multirow{2}{3cm}{\centering\textbf{Flow Black Rate / Liquid Type}}} &
    \multicolumn{1}{c|}{\multirow{2}{1cm}{\centering\textbf{N2 Rate}}}&
    \multicolumn{1}{c|}{\multirow{3}{*}{\centering\textbf{Activity Info}}} \\\cline{4-5}

    & & & 
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{Circulation}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{Wellhead}} &
    & & & & \\\cline{3-9}

    & &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{Start/End}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(psi)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(psi)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(lbs)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(bbl/min)}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(bbl)/Name}} &
    \multicolumn{1}{c|}{\centering\scriptsize\textbf{(SCF/min)}} & 

    \\\hline \hline \hline \hline

    \endhead
    \multicolumn{3}{l}{Continued on next page ...} \\ 
    \endfoot
    \endlastfoot

    \multicolumn{1}{|c|}{\multirow{2}{*}{\centering{8:00}}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\parbox{27.4mm}{\centering\wrap{rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr}}}} &
    \multicolumn{1}{c|}{\centering{60}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\centering{86.9}}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\centering{89.2}}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\centering{210}}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\centering{50}}} &
    \multicolumn{1}{c|}{\centering{289}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\centering{1289}}} &
    \multicolumn{1}{c|}{\multirow{2}{*}{\centering{This is test info for the activity info}}} 

    \\* \cline{3-3}\cline{8-8}

    & &
    \multicolumn{1}{c|}{\centering{9:00}} &
    & & & &
    \multicolumn{1}{c|}{\centering{kj kjhf }} &
    &

    \\* \cline{1-10}

    &
    \centering{Comment} &
    \multicolumn{8}{l|}{kjrhe rh h h hher kjhkj rhje hjewrkjhe rkjher k} 

    \\\hline


\end{longtabu}

\end{landscape}
\end{document}

enter image description here

0

Looks like i was able to solve this using embedded velocity logic in the latex code. since the report is dynamic i was able to calculate how many extra rows i needed to add based on the given text passed in. then i would dynamically expand cells as needed. was alot of work but i dont see any other solution based off what i read on the internet.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.