<br><font size=2 face="sans-serif">Hello all,</font>
<br>
<br><font size=2 face="sans-serif">I am using longtable to create a document
that is data driven where I need to capture the last known balance in a
transaction so it can be used in the head and foot.</font>
<br><font size=2 face="sans-serif">I have tried using \newcounter, \newsavebox
and \sbox, \savebox and \setcounter to store the value for later retrieval
but I'm not getting the value I think I have set. &nbsp;</font>
<br>
<br><font size=2 face="sans-serif">I want to be able to set a value in
memory (+ or &nbsp;- &nbsp;999,99) and update it every time a transaction
is created. &nbsp;When a page break occurs I want to retrieve that value</font>
<br><font size=2 face="sans-serif">with in a command {\continuehead and
\continuefoot).</font>
<br>
<br><font size=2 face="sans-serif">What should I be using to accomplish
this?</font>
<br>
<br><font size=2 face="sans-serif">Here is a sample of what I am trying
to do.</font>
<br>
<br>
<br><font size=2 face="Courier">&nbsp;\begin{longtable}{l}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;%% : Transaction
Header</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\transactionheader\\</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\transactionstartbalance{+8926,12}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\endfirsthead</font>
<br>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;%% : Transaction
Page Break Header</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\transactionheader\\</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\continuehead\\</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\endhead</font>
<br>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;%% : Transaction
Page Break Footer</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\continuefoot\\</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\endfoot</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;%% : Transaction
Turnover</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\transactionturnover{-7708,47}{+0,00}\\</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;%% : Account
Footer</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\accountfoot{+1217,65}\\</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp; &nbsp;\endlastfoot</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; </font>
<br><font size=2 face="Courier">&nbsp; &nbsp; &nbsp;</font>
<br><font size=2 face="Courier">&nbsp; &nbsp;\transactiondata{2005/02/13}{2005/02/13}{PRZELEW
OBCIĄŻENIOWY} {F.NR.26/04-2437;37 F.NR.24/04-2390; 00 &nbsp;FIRMA USŁUGOWA
MARIUSZ BARCZYŃSKI MARIUSZ BARCZYŃSKI UL.ŁOWISKOWA 31 85-436 BYDGOSZCZ65
1020 1475 0000 8202 0074 8566 PKOBP O/2 Bydgoszcz}{-4827,37}{+4098,75}\\</font>
<br>
<br><font size=2 face="Courier">% : continues for multiple transactions
that break the page boundary.</font>
<br><font size=2 face="Courier">\end{longtable}</font>
<br>
<br><font size=2 face="sans-serif">The commands that in question are as
follows:</font>
<br>
<br><font size=2 face="Courier">% : FUNCTION: TRANSACTIONDATA</font>
<br><font size=2 face="Courier">\newcommand{\transactiondata}[6]{</font>
<br><font size=2 face="Courier">% &nbsp;\sffamily\fontseries{m}\fontshape{n}\selectfont</font>
<br><font size=2 face="Courier">&nbsp; \fontfamily{phv}\fontseries{m}\fontshape{n}\selectfont</font>
<br><font size=2 face="Courier">&nbsp; \small</font>
<br><font size=2 face="Courier">&nbsp; \parbox[t]{18.2cm}{</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \vskip.5pt</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \hskip.2cm\parbox[t]{2cm}{#1\hfil}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox[t]{2cm}{#2\hfil}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox[t]{8.5cm}{\parbox[t]{8cm}{#3\hfill}
\linebreak #4\hfill}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox[t]{3cm}{\hfil\numprint{#5}}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox[t]{2cm}{\hfill\numprint{#6}}</font>
<br>
<br><font size=2 face="Courier">% : Save the current transaction balance
for later use.</font>
<br><font size=2 face="Courier">%%% &nbsp; &nbsp;\setcounter{transactionbalance}{#6}</font>
<br><font size=2 face="Courier">%%% &nbsp; &nbsp;\sbox{\transactionbalance}{#6}</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \vskip6pt\rule{18.2cm}{0.25pt}</font>
<br><font size=2 face="Courier">&nbsp; }</font>
<br><font size=2 face="Courier">&nbsp; </font>
<br><font size=2 face="Courier">}</font>
<br>
<br><font size=2 face="Courier">% : FUNCTION: CONTINUEHEAD</font>
<br><font size=2 face="Courier">\newcommand{\continuehead}{</font>
<br><font size=2 face="Courier">&nbsp; </font>
<br><font size=2 face="Courier">&nbsp; \parbox{18.2cm}{</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \vskip2pt</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \small</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \hskip1cm\parbox{14cm}{\hfill
Saldo z przeniesienia z popzednij strony}%</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox{0.5cm}{~}%</font>
<br><font size=2 face="Courier">% : Retrieve the last transaction balance</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox{3.5cm}{\thetransactionbalance}</font>
<br><font size=2 face="Courier">% &nbsp; &nbsp;\vskip-3pt \rule{19.5cm}{0.25pt}</font>
<br><font size=2 face="Courier">&nbsp; }</font>
<br><font size=2 face="Courier">}</font>
<br>
<br><font size=2 face="Courier">% : FUNCTION: CONTINUEFOOT</font>
<br><font size=2 face="Courier">\newcommand{\continuefoot}{</font>
<br><font size=2 face="Courier">&nbsp; </font>
<br><font size=2 face="Courier">&nbsp; \parbox{18.2cm}{</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \vskip2pt</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \small</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \hskip1cm\parbox{14cm}{\hfill
Saldo do przeniesienia na nast\c{e}pn\c{a} stron\c{e}}%</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox{0.5cm}{~}%</font>
<br><font size=2 face="Courier">% : Retrieve the last transaction balance</font>
<br><font size=2 face="Courier">&nbsp; &nbsp; \parbox{3.5cm}{\thetransactionbalance}</font>
<br><font size=2 face="Courier">&nbsp; }</font>
<br><font size=2 face="Courier">}</font>
<br>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
</font><font size=1 face="Comic Sans MS">Brent Legge - Technical Lead<br>
Professional Services - ACI Worldwide (MessagingDirect) </font>
<p><font size=1 face="Comic Sans MS">email: leggeb@aciworldwide.com<br>
I'm a prisoner of Lotus Notes, please excuse any email transgressions.</font>