Hi Anton, Bleddyn,

Thanks for the replies.  I checked the Ignite example, and it's not quite
what I have, so here's the code.  I've stripped out some of the
non-essential stuff to keep it shorter.

---------------
%DEFINE RPT_MAX_ROWS ="20"
%DEFINE START_ROW_NUM ="1"

%FUNCTION(DTW_SQL) SearchResults() {
SELECT * FILE1 left outer join FILE2
    on ACCT1 = ACCT2
 WHERE @SQLwhere()
 ORDER BY NAME, ACCT1

%REPORT{
    @DTW_ADD(START_ROW_NUM,RPT_MAX_ROWS,next_row_num)
    @DTW_SUBTRACT(START_ROW_NUM,RPT_MAX_ROWS,prev_row_num)
    @DTW_SUBTRACT(next_row_num,"1",last_row)
    @DTW_ASSIGN(NbrAcctsFound,$(TOTAL_ROWS))
    Select an account:
    Reporting rows $(START_ROW_NUM) through $(last_row)
    <table border=3 cellspacing=0 cellpadding="3" width=90%>
    <tr>
        <th>ROW</th>
        <th>ACCT</th>
        <th>NAME</th>
    </tr>

%ROW{
    <tr>
        <td align=center>$(ROW_NUM)</td>
        <td align=center>$(V_ACCT)</td>
        <td align=left>$(V_NAME)</td>
    </tr>
%}
</table>

<p>
%IF (START_ROW_NUM > RPT_MAX_ROWS)
    <a href="/cgi-bin/netdatamacros.dtw/macro1?ACCT=$(ACCT)&Name=$(Name)&
START_ROW_NUM=$(prev_row_num)">PREVIOUS</a>|||
%ELSE
    PREVIOUS |||
%ENDIF

%IF (next_row_num < TOTAL_ROWS)
    <a
href="/cgi-bin/netdatamacros.dtw/macro1?ACCT=$(ACCT)&Name=$(Name)&START_ROW_
NUM=$(next_row_num)">NEXT</a>
%ELSE
    NEXT
%ENDIF
</p>
%}
%}
---------------

The HTML this generates has the correct START_ROW_NUM for the 2nd page, i.e.

http://xyz.com/cgi-bin/netdatamacros.dtw/macro1?ACCT=&NAME=test&START_ROW_NU
M=21

yet clicking on this link brings up the 1st page again.  Is it because of
the global definition of START_ROW_NUM?  I was under the impression this was
a Net.Data defined variable, but if I leave that off, I get "Error Number
4001".

Peter Dow
Dow Software Services, Inc.
909 793-9050 voice
909 522-3214 cellular
909 793-4480 fax





As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.