Cannot Solve My Problem
Kenneth Brody
kenbrody at spamcop.net
Sun Mar 25 11:27:04 PDT 2012
On 3/24/2012 7:09 PM, haroldef wrote:
> Hi,
>
> I sent this to myself before sending out. It looked good. I will send
> this to myself to see what it looks like.
Yes. Send in plain text, rather than HTML, and it will come through to the
list just fine.
> I am having trouble with a printout, probably because of my age. I have
[... doesn't print last record ...]
> The program is:
>
> :'NOTE-- YT IS FOUR DIGIT YEAR; RN IS RECORD NUMBER:'ZN IS TWO DIGIT
> YEAR, NB IS THE NUMBER OF NEW MEMBERS IN A YEAR:
>
> ::'TM=Total For Each Year:
>
> :YT NE "":GOTO LINE:'YT=Each Year Since 1989
> ::ZN=63;ID=63;YT="1989";NB="0";tm="":
> LINE:ZN NE ID:GOTO PRT:
> ::NB=NB+"1";END:
> PRT::DEBUG ON:
> ::tm=tm+nb;PRINT:
> :ZN="99":ZN="00";yt=yt+"1";nb="0";END:
> ::ZN=ZN+"1";yt=yt+"1";nb="0";END:
Since your code only executes the PRINT when "ZN NE ID" is true, which I
assume means that the year has changed, you will never print the last
record. There are several ways to print the last record using processing
like you have.
The simplest change would be to force the print on the last record:
LINE:
If: ZN ne ID or @RS = @TS
Then: goto prt
Another (better, IMHO) solution would be to use subtotals for this. I am
assuming you are sorting on the year. If so, simply add a subtotal break on
year, and put your information in the subtotal section. (Shrink the data
section to 1 line and leave it blank, and filePro won't print any data lines
at all.)
--
Kenneth Brody
More information about the Filepro-list
mailing list