For Programmers: Free Programming Magazines  


Home > Archive > Clipper > April 2004 > Two characters causing new page to be printed









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Two characters causing new page to be printed
hpy_awad@yahoo.com

2004-04-12, 7:30 am

Below is my clipper5.01 program . I can find at the end of each record
produced 2 characters (black squares) causing a new page to be printed
.. What is the exaplination of those two characters . I have the
resulted report called report01.pcl below the progrqam . You can see
the two characters using Msdos editor .


-------------------begin of report01.prg---------------------
do report1_PRINT

procedure report1_PRINT
*--------------------
PARAMETER N,field
local i:=0
set date format to "DD/MM/YYYY"
public nline:=0
set printer on
set console off
set device to printer
*set printer to LPT1
set printer to report01.pcl
?chr(27)+"&l1O"+chr(27)+"(s0p16.67h8.9v0s0b100T"+chr(27)+"(s3B"
SELECT 2
use sub_bran INDEX sub_bran
GO TOP
REINDEX
do while .t.
select 1
use sub_book
INDEX on bok_lib_co+padl(ltrim(str(bok_no)),3,"0") to index1
GO TOP
reindex
nline:=nline-i
i:=0
@NLINE +2 ,2 SAY "last updted:"
@NLINE +2 ,15 SAY date()
@NLINE +3 ,30 SAY "Printing the file of sub_book.dbf filtered on :
"+ alltrim(2->bran_na)
@NLINE +4 ,30 SAY"
-------------------------------"
@NLINE +5 ,1 SAY "B O O K C. B O O K N
A M E B O O K A U T H O R
B O O K I S B N"
@NLINE +6 ,1 SAY "---------
---------------------------------------------------------
---------------------------------------------------------
----------------"
do while 1->(!EOF())
if (2->bran_na==1->bok_bran) .AND. (1->(!EOF()))
nline++
@NLINE+6 ,1 say alltrim(1->bok_lib_re)
@NLINE+6 ,13 say alltrim(1->bok_name)
@NLINE+6 ,71 say alltrim(1->bok_author)
@NLINE+6 ,130 say alltrim(1->bok_isbn)
select 1
skip +1
i++
loop
else
select 1
skip +1
loop
ENDIF
if 1->(eof())
exit
endif
enddo
if 2->(eof())
exit
else
select 2
skip +1
loop
endif
enddo
set printer to
SET DEVICE TO SCREEN
CLOSE DATABASES
RETURN

--------------------End of report01.prg---------------------


-------------------begin of report01.pcl---------------------


&l1O(s0p16.67h8.9v0s0b100T(s3B
last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : dictionaries

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
IDSC/REF14 Longman Dictionary Of contemporry English
Longman
0-582-45630-4


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : longman preparation

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
IDSC/REF13 Longman Preparation cource for the Toefl Test Volume A
Deborah Phillips
0-201-84676-4


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : principles

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
ITI/REF5 Programming langauge Concepts And Paradigms
David A. Watt-William Findlay-John Hughes
0-13-728874-3


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using c

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
AUC/REF1 ererrew
4334 3443
AUC/REF2 Learning to program in C
Thomas Plum auc-ref02
AUC/REF3 Programming in C
F. Richard Moore auc-ref03
AUC/REF4 C by dissection
Al Kelley - Ira Pohl auc-ref04
AUC/REF5 Compleat C
J. F. Peters III - H.M.Sallam auc-ref05
AUC/REF6 Advanced quick C
Kan Knecht auc-ref06
HTI-OB/REF1 Programming in Anci C
Strphen G. Kochan
hti-ob/ref01
HTI-OB/REF3 Programming in Ansi c revices edition
Stephen G. Kochan missing
IDSC/REF1 C The complete reference
Herbert Schildt
0-07-881263-1
IDSC/REF2 C by Example
Noel Kalicharan
0-521-56700-9
IDSC/REF3 The C programming language
Brian W. Kernighan - Dennis M. Richie
0-87692-522-0
IDSC/REF4 problem solving and program design in C
Jeri R. Hanly - Elliot B. Koffman
0-201-59063-8
IDSC/REF5 C problem solving and programming
Kenneth A. Barclay
0-201-59063-8
IDSC/REF6 Theory and problems of programming with C
Byron S. Gottfried, Ph.D
0-07-023854-5
IDSC/REF7 A first book of C fundamentals of C programming
Gary Bronson - Stephen Menconi
0-314-81348-9
IDSC/REF8 Advanced C
Herbert Schildt
0-07-881348-4
IDSC/REF16 Learning C
Peter Aitken
0-672-30009-5
IDSC/REF17 C by example
Greg Perry
0-88022-813/X
IDSC/REF26 Applications Programming in C
Richard Johnsonbaugh - Martin Kalin
0-02-946006-9
ITI/REF1 The professional programmers guide to C
Pat McKay iti-ref01
ITI/REF2 Indispensable guide to C
Paul Davis
0-201-62438-9
ITI/REF3 On To C
Patrick Henry Winston
0-201-58042/X
ITI/REF4 C for Corporate programmers
Jim Inglis
0-471-93965/X
ITI/REF6 The annotated ANSI C standard
Herbert Schildt
0-07-881952-0
ITI/REF7 C programming for embedded systems
Kirk Zurell
1-929629-04-4
ITI/REF8 pointers on C
Kenneth A. R
0-673-99986-6
ITI/REF9 Efficient C programming
Mark Allen Weiss
0-13-361932-X
SA/REF1 C Program Design For Engineers
Jery R. Hanly - Elliot B. Koffman
undetermined


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using c graphics

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
HTI-NB/REF3 Computer Graphics C version
Donald Hearn - M. Pauline Baker
81-7808-794-4


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using c plus plus

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
IDSC/REF11 Graphics Programming in Turbo C Plus_Plus
Ben Ezzell
0-201-57023-8
IDSC/REF15 C plus plus complete a reference and tutorial to standard
Anthony Rudd
0-471-06565-/x
IDSC/REF18 Borland C plus plus
borland Borland
Manual
IDSC/REF19 Turbo C++ Programming - An object -oriented approach
Ben Ezzell
0-201-55023-7
IDSC/REF21 Turbo C/C++ the Complete Reference
Herbert Schildt
0-07-881535-5
IDSC/REF22 teach yourself C Plus Plus
AI STEVENS
1-55828-176-2
IDSC/REF23 programming in C plus plus
Nell Dale-Chip Weems-mark Headington
0-7637-1424-0


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using clipper

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
HTI-NB/REF1 using clipper
W. Edward Tiley
0-88022-885-7
HTI-NB/REF2 Clipper Programming Guide
Rick Spence
9-9999-9999-9
HTI-NB/REF4 using clipper credits
Many missing
IDSC/REF27 programming in clipper
Stephen J. Straley missing


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using cobol

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
HTI-OB/REF2 TEACH YOURSELF COBOL IN 24 HOURS
Thane Hubbell
81-7635-208-X
IDSC/REF12 advanced structured Cobol
Edward J. Coburn
0-15-501873-6


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using post script

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
IDSC/REF9 Postscript Language Tutorial and Cookbook
Adobe Systems Incorporated
0-201-10179-3
IDSC/REF20 understanding postscript programming
David A. Holzgang
0-89588-396-1


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : using unix shell

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
IDSC/REF10 Unix Shell Programming
Lowell Jay Arthur , Edward N. Burns
0-471-59941-7


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on : visual c_v6

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------
IDSC/REF24 using Visual C++ 6
Kate Gregory
0-7897-1539-2
IDSC/REF25 Mastering Visual C++ 6
Michael J. Young
0-7821-2273-6


last updted: 12/04/2004
Printing the file of sub_book.dbf
filtered on :

-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N
--------- ---------------------------------------------------------
---------------------------------------------------------
----------------

-------------------end of report01.pcl---------------------
Norman Perelson

2004-04-12, 12:30 pm

On Mon, 12 Apr 2004 03:17:40 -0700, hpy_awad@yahoo.com wrote:

> Below is my clipper5.01 program . I can find at the end of each record
> produced 2 characters (black squares) causing a new page to be printed
> . What is the exaplination of those two characters . I have the
> resulted report called report01.pcl below the progrqam . You can see
> the two characters using Msdos editor .
>


Try using a low-level editor, like DEBUG, to see what the 2 characters
are. That may help. My guess is that they are recorded in your data
field 1->bok_isbn, and they are the post-amble from your bar code scanner.

HTH
Norman


Steve Lupton

2004-04-12, 2:30 pm

There are so many things in this code that should be changed, it's hard to
know where to begin. Do you really need to index sub_bran every time you
open it? Do you really need to index sub_book every time through the loop?
Twice? You're also checking for eof before moving the record pointer for
sub_bran which is giving you an unneeded last page with only header info.
Your program would also be much easier to follow (and better structurally)
if you never used the "loop" command and adjusted your code accordingly.
That being said.

You're resetting your line counter to zero on every pass (nLine:=nLine-i).
This will cause Clipper to insert a form feed (hex 0C) so you won't
overwrite everything on one page - this is likely one of two squares you
see. The other is likely carriage return (hex OD) or line feed (hex OA) or
tab (hex 09).

"hpy_awad@yahoo.com" <ehab_aziz2001@yahoo.com> wrote in message
news:7ecaee57.0404120217.e1a2f44@posting.google.com...
> Below is my clipper5.01 program . I can find at the end of each record
> produced 2 characters (black squares) causing a new page to be printed
> . What is the exaplination of those two characters . I have the
> resulted report called report01.pcl below the progrqam . You can see
> the two characters using Msdos editor .
>
>
> -------------------begin of report01.prg---------------------
> do report1_PRINT
>
> procedure report1_PRINT
> *--------------------
> PARAMETER N,field
> local i:=0
> set date format to "DD/MM/YYYY"
> public nline:=0
> set printer on
> set console off
> set device to printer
> *set printer to LPT1
> set printer to report01.pcl
> ?chr(27)+"&l1O"+chr(27)+"(s0p16.67h8.9v0s0b100T"+chr(27)+"(s3B"
> SELECT 2
> use sub_bran INDEX sub_bran
> GO TOP
> REINDEX
> do while .t.
> select 1
> use sub_book
> INDEX on bok_lib_co+padl(ltrim(str(bok_no)),3,"0") to index1
> GO TOP
> reindex
> nline:=nline-i
> i:=0
> @NLINE +2 ,2 SAY "last updted:"
> @NLINE +2 ,15 SAY date()
> @NLINE +3 ,30 SAY "Printing the file of sub_book.dbf filtered on :
> "+ alltrim(2->bran_na)
> @NLINE +4 ,30 SAY"
> -------------------------------"
> @NLINE +5 ,1 SAY "B O O K C. B O O K N
> A M E B O O K A U T H O R
> B O O K I S B N"
> @NLINE +6 ,1 SAY "---------
> ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------"
> do while 1->(!EOF())
> if (2->bran_na==1->bok_bran) .AND. (1->(!EOF()))
> nline++
> @NLINE+6 ,1 say alltrim(1->bok_lib_re)
> @NLINE+6 ,13 say alltrim(1->bok_name)
> @NLINE+6 ,71 say alltrim(1->bok_author)
> @NLINE+6 ,130 say alltrim(1->bok_isbn)
> select 1
> skip +1
> i++
> loop
> else
> select 1
> skip +1
> loop
> ENDIF
> if 1->(eof())
> exit
> endif
> enddo
> if 2->(eof())
> exit
> else
> select 2
> skip +1
> loop
> endif
> enddo
> set printer to
> SET DEVICE TO SCREEN
> CLOSE DATABASES
> RETURN
>
> --------------------End of report01.prg---------------------
>
>
> -------------------begin of report01.pcl---------------------
>
>
> &l1O(s0p16.67h8.9v0s0b100T(s3B
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : dictionaries
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> IDSC/REF14 Longman Dictionary Of contemporry English
> Longman
> 0-582-45630-4
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : longman preparation
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> IDSC/REF13 Longman Preparation cource for the Toefl Test Volume A
> Deborah Phillips
> 0-201-84676-4
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : principles
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> ITI/REF5 Programming langauge Concepts And Paradigms
> David A. Watt-William Findlay-John Hughes
> 0-13-728874-3
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using c
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> AUC/REF1 ererrew
> 4334 3443
> AUC/REF2 Learning to program in C
> Thomas Plum auc-ref02
> AUC/REF3 Programming in C
> F. Richard Moore auc-ref03
> AUC/REF4 C by dissection
> Al Kelley - Ira Pohl auc-ref04
> AUC/REF5 Compleat C
> J. F. Peters III - H.M.Sallam auc-ref05
> AUC/REF6 Advanced quick C
> Kan Knecht auc-ref06
> HTI-OB/REF1 Programming in Anci C
> Strphen G. Kochan
> hti-ob/ref01
> HTI-OB/REF3 Programming in Ansi c revices edition
> Stephen G. Kochan missing
> IDSC/REF1 C The complete reference
> Herbert Schildt
> 0-07-881263-1
> IDSC/REF2 C by Example
> Noel Kalicharan
> 0-521-56700-9
> IDSC/REF3 The C programming language
> Brian W. Kernighan - Dennis M. Richie
> 0-87692-522-0
> IDSC/REF4 problem solving and program design in C
> Jeri R. Hanly - Elliot B. Koffman
> 0-201-59063-8
> IDSC/REF5 C problem solving and programming
> Kenneth A. Barclay
> 0-201-59063-8
> IDSC/REF6 Theory and problems of programming with C
> Byron S. Gottfried, Ph.D
> 0-07-023854-5
> IDSC/REF7 A first book of C fundamentals of C programming
> Gary Bronson - Stephen Menconi
> 0-314-81348-9
> IDSC/REF8 Advanced C
> Herbert Schildt
> 0-07-881348-4
> IDSC/REF16 Learning C
> Peter Aitken
> 0-672-30009-5
> IDSC/REF17 C by example
> Greg Perry
> 0-88022-813/X
> IDSC/REF26 Applications Programming in C
> Richard Johnsonbaugh - Martin Kalin
> 0-02-946006-9
> ITI/REF1 The professional programmers guide to C
> Pat McKay iti-ref01
> ITI/REF2 Indispensable guide to C
> Paul Davis
> 0-201-62438-9
> ITI/REF3 On To C
> Patrick Henry Winston
> 0-201-58042/X
> ITI/REF4 C for Corporate programmers
> Jim Inglis
> 0-471-93965/X
> ITI/REF6 The annotated ANSI C standard
> Herbert Schildt
> 0-07-881952-0
> ITI/REF7 C programming for embedded systems
> Kirk Zurell
> 1-929629-04-4
> ITI/REF8 pointers on C
> Kenneth A. R
> 0-673-99986-6
> ITI/REF9 Efficient C programming
> Mark Allen Weiss
> 0-13-361932-X
> SA/REF1 C Program Design For Engineers
> Jery R. Hanly - Elliot B. Koffman
> undetermined
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using c graphics
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> HTI-NB/REF3 Computer Graphics C version
> Donald Hearn - M. Pauline Baker
> 81-7808-794-4
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using c plus plus
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> IDSC/REF11 Graphics Programming in Turbo C Plus_Plus
> Ben Ezzell
> 0-201-57023-8
> IDSC/REF15 C plus plus complete a reference and tutorial to standard
> Anthony Rudd
> 0-471-06565-/x
> IDSC/REF18 Borland C plus plus
> borland Borland
> Manual
> IDSC/REF19 Turbo C++ Programming - An object -oriented approach
> Ben Ezzell
> 0-201-55023-7
> IDSC/REF21 Turbo C/C++ the Complete Reference
> Herbert Schildt
> 0-07-881535-5
> IDSC/REF22 teach yourself C Plus Plus
> AI STEVENS
> 1-55828-176-2
> IDSC/REF23 programming in C plus plus
> Nell Dale-Chip Weems-mark Headington
> 0-7637-1424-0
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using clipper
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> HTI-NB/REF1 using clipper
> W. Edward Tiley
> 0-88022-885-7
> HTI-NB/REF2 Clipper Programming Guide
> Rick Spence
> 9-9999-9999-9
> HTI-NB/REF4 using clipper credits
> Many missing
> IDSC/REF27 programming in clipper
> Stephen J. Straley missing
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using cobol
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> HTI-OB/REF2 TEACH YOURSELF COBOL IN 24 HOURS
> Thane Hubbell
> 81-7635-208-X
> IDSC/REF12 advanced structured Cobol
> Edward J. Coburn
> 0-15-501873-6
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using post script
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> IDSC/REF9 Postscript Language Tutorial and Cookbook
> Adobe Systems Incorporated
> 0-201-10179-3
> IDSC/REF20 understanding postscript programming
> David A. Holzgang
> 0-89588-396-1
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : using unix shell
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> IDSC/REF10 Unix Shell Programming
> Lowell Jay Arthur , Edward N. Burns
> 0-471-59941-7
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on : visual c_v6
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
> IDSC/REF24 using Visual C++ 6
> Kate Gregory
> 0-7897-1539-2
> IDSC/REF25 Mastering Visual C++ 6
> Michael J. Young
> 0-7821-2273-6
>
>
> last updted: 12/04/2004
> Printing the file of sub_book.dbf
> filtered on :
>
> -------------------------------
> B O O K C. B O O K N A M E
> B O O K A U T H O R B O O K I
> S B N
> --------- ---------------------------------------------------------
> ---------------------------------------------------------
> ----------------
>
> -------------------end of report01.pcl---------------------



hpy_awad@yahoo.com

2004-04-13, 10:30 am

I found the two characters are 0D 0A in the debug command
techno

2004-04-13, 5:30 pm

On 13 Apr 2004 06:25:45 -0700, ehab_aziz2001@yahoo.com
(hpy_awad@yahoo.com) wrote:

>I found the two characters are 0D 0A in the debug command


You need to quote your original problem so we can get up to speed.
Stephen Quinn

2004-04-13, 6:30 pm


CHR(13) + CHR(10) - Carriage Return and Line Feed

You might try adding
SET CONSOLE OFF

// Do Report

SET CONSOLE ON

before & after your SET PRINTER commands.

--
HTH
Steve Quinn


hpy_awad@yahoo.com

2004-04-16, 6:30 pm

It does not work adding set console off and on
Norman Perelson

2004-04-16, 7:30 pm


"hpy_awad@yahoo.com" <ehab_aziz2001@yahoo.com> wrote in message
news:7ecaee57.0404161317.2b62f0b@posting.google.com...
> It does not work adding set console off and on


It needs more than a CHR(10)+CHR(13) to cause an extra page break. I quote
the heart of your program text here:
....
do while 1->(!EOF())
if (2->bran_na==1->bok_bran) .AND. (1->(!EOF()))
nline++
@NLINE+6 ,1 say alltrim(1->bok_lib_re)
@NLINE+6 ,13 say alltrim(1->bok_name)
@NLINE+6 ,71 say alltrim(1->bok_author)
@NLINE+6 ,130 say alltrim(1->bok_isbn)
select 1
skip +1
i++
loop
....
Previously you wrote:
>I can find at the end of each record
>produced 2 characters (black squares) causing a new page to be printed.
>What is the exaplination of those two characters


Either you are not listing the program code accurately, or the characters in
question are in the bok_isbn field. Only non-printable characters other
than ascii 0x0A and 0x0D and 0x20 will print or display a box character.
Look for a 0x03 or a 0x0C in the data field 1->bok_isbn. They could be the
postamble sent from your bar code scanner.

Try commenting out the line in question and see if the problem goes away.
If it does then write a filter program to get rid of the offending
characters. Maybe using LEFT() instead of ALLTRIM() will be enough to fix
it.

HTH
Norman
--
Norman Perelson
http://www.shopkeeper.co.za


hpy_awad@yahoo.com

2004-04-18, 7:30 pm

I already commented the line nline=nline-i

What other trials should I try ?
Norman Perelson

2004-04-19, 4:30 am


"hpy_awad@yahoo.com" <ehab_aziz2001@yahoo.com> wrote in message
news:7ecaee57.0404181415.3e45b1df@posting.google.com...
> I already commented the line nline=nline-i
>
> What other trials should I try ?


Read my posting!!
The line to comment out is:
@NLINE+6 ,130 say alltrim(1->bok_isbn)

--
Norman Perelson
http://www.shopkeeper.co.za


donny

2004-04-19, 12:30 pm

"Norman Perelson" <norman@shoso.co.za> wrote in message news:GIOdnYc0l5Q6Gx7dRVn-jg@is.co.za...
|
| "hpy_awad@yahoo.com" <ehab_aziz2001@yahoo.com> wrote in message
| news:7ecaee57.0404181415.3e45b1df@posting.google.com...
| > I already commented the line nline=nline-i
| >
| > What other trials should I try ?
|
| Read my posting!!
| The line to comment out is:
| @NLINE+6 ,130 say alltrim(1->bok_isbn)
|
| --
| Norman Perelson
| http://www.shopkeeper.co.za
|

Norman was right!
Make sure alltrim(1->bok_lib_re) will never exceed 12 chars, since u print the next data at col 13.
Anyway, why don't u try a one liner:
@NLINE+6 ,1 say PadR(1->bok_lib_re,(13-1))+PadR(1->bok_name,(71-13))+PadR(1->bok_author,(130-71))+alltrim(1->bok_isbn) which
will give you same result as 4 lines of @ in a lot saver way?

HTH,
donny


hpy_awad@yahoo.com

2004-04-23, 10:30 am

I tried
@NLINE+6 ,1 say PadR(1->bok_lib_re,(13-1))+PadR(1->bok_name,(71-13))+PadR(1->bok_author,(130-71))+alltrim(1->bok_isbn)
which

That line also causing the two characters to be appeared ? What other
suggestions please ?
Norman Perelson

2004-04-23, 12:30 pm


"hpy_awad@yahoo.com" <ehab_aziz2001@yahoo.com> wrote in message
news:7ecaee57.0404230507.6c5c4b82@posting.google.com...
> I tried
> @NLINE+6 ,1 say

PadR(1->bok_lib_re,(13-1))+PadR(1->bok_name,(71-13))+PadR(1->bok_author,(130
-71))+alltrim(1->bok_isbn)
> which
>
> That line also causing the two characters to be appeared ? What other
> suggestions please ?

Try leaving out:

.....+alltrim(1->bok_isbn)

--
Norman Perelson
http://www.shopkeeper.co.za


Steve Lupton

2004-04-23, 9:30 pm

As I stated earlier in this thread, the reason you're getting a new page is
that your line counter is being reset to zero after each record. This is
Clipper's/your printer driver's way of keeping you from accidentally
overwriting earlier printed lines. Cr+lf characters are sent by the
clipper @ say command on every line and they are not the ones creating the
new page. Rather it's combination of the chr(12) + chr(13) + chr(10).


"hpy_awad@yahoo.com" <ehab_aziz2001@yahoo.com> wrote in message
news:7ecaee57.0404230507.6c5c4b82@posting.google.com...
> I tried
> @NLINE+6 ,1 say

PadR(1->bok_lib_re,(13-1))+PadR(1->bok_name,(71-13))+PadR(1->bok_author,(130
-71))+alltrim(1->bok_isbn)
> which
>
> That line also causing the two characters to be appeared ? What other
> suggestions please ?



Joe Wright

2004-04-24, 11:30 am

Steve Lupton wrote:
> As I stated earlier in this thread, the reason you're getting a new page is
> that your line counter is being reset to zero after each record. This is
> Clipper's/your printer driver's way of keeping you from accidentally
> overwriting earlier printed lines. Cr+lf characters are sent by the
> clipper @ say command on every line and they are not the ones creating the
> new page. Rather it's combination of the chr(12) + chr(13) + chr(10).
>

I've come in rather late on this thread, please excuse me. It is
chr(12), the FF or Form Feed only which causes the printer to print
the current page, not any combination with CR and LF.
--
Joe Wright mailto:joewwright@comcast.net
"Everything should be made as simple as possible, but not simpler."
--- Albert Einstein ---
Stephen Quinn

2004-04-24, 9:30 pm

Joe

> I've come in rather late on this thread, please excuse me. It is
> chr(12), the FF or Form Feed only which causes the printer to print
> the current page, not any combination with CR and LF.


CRLF might cause a page eject if it's they are printed on the last line of a page, they won't cause
a form feed in any other context that I'm aware of.

A CHR(12) anywhere on the page will cause a page eject.

The printer (dot matrix mainly) can also cause a form feed if not set up correctly
- ie step over perforations should be off if you want to do your own line counting

--
HTH
Steve Quinn


hpy_awad@yahoo.com

2004-04-27, 6:30 am

It went OK iwth the line that ended with alltrim(padr....))

OK Thanks partners..
hpy_awad@yahoo.com

2004-04-27, 7:30 am

The two characters appeared in other place in the program rather than
the last record of the data .

last updted : 27/04/2004 Time : 12:08:00
Printing the file of
sub_book.dbf filtered on : computer sceince computer
principles


-------------------------------
B O O K C. B O O K N A M E
B O O K A U T H O R B O O K I
S B N THEORY PRACTICAL
--------- ---------------------------------------------------------
---------------------------------------------------------
---------------- ------ ---------
IDSC/REF30 Introdcution to computer science an alogoithmic approach
PJean-Paul trembly,John M. Dedourek,Richard B. Bunt
0-07-100959-0 none none
ITI/REF12 Computer science an overview
J. Glenn Brookshear
0-201-78130-1 none none
ITI/REF13 The computer science problem solver
Staff pf research and educations assocication Dr. M.Fogiel
0-87891-525-7 none none
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Record founds in sub_book.dbf = 77
Record
Record founds for that item in sub_book.dbf = 3
Record

^^

Here the code of writing that line

@NLINE +7 ,1 SAY "-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
@NLINE +8,1 say "Record founds in sub_book.dbf = "
@NLINE +8 ,65 say alltrim(str(reccount()))+" Record"
@NLINE +9 ,1 say "Record founds for that item in sub_book.dbf = "
@NLINE +9 ,65 say alltrim(str(i))+" "+alltrim(" Record")

Am sorry the problem still exist ..
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com