dBase III 报告中的新行是什么?

What is the New line in reports for dBase III?

在生成的报告中,我无法换行。我只能并排添加 4 个字段,但我想在新行中添加它们。

如果您只是将打印机 (LPT1) 作为设备进行打印,则在输入将设备从屏幕切换到打印机的代码后,只需参考您要打印的行号即可。这是我用来打印页眉和后续页眉的旧程序的一些代码。

  1. 代码的早期:

    SET CONSOLE OFF && so your output doesn't echo to the screen while printing.
    SET PRINTER ON
    SET PRINTER TO LPT1
    
  2. 然后调用Prt_Header()函数打印第一页页眉。在打印详细记录时,您必须跟上行号,当您到达页面底部时,使用 EJECT 命令踢出该页面并再次调用 Prt_Header()

****************************
STATIC FUNCTION Prt_Header()
****************************

    nPage += 1

    @  1,  4 SAY DATE()
    @  1, 55 SAY "MyCompany INTERNATIONAL, INC."
    @  1,121 SAY "Page " + STR( nPage, 4, 0)

    @  2, 51 SAY "MY Report Name"
    @  3,  4 SAY "Pay Group:  " + cPayGroup
    @  3, 58 SAY "For Period: " + cPeriodMon + "/" + cPeriodYr
    @  4,  4 SAY cLines
    @  5,  4 SAY "EXECUTIVE " + "(" + cParTitle + "):  " + cName
    @  5, 70 SAY "Member #:" + cDist
    @  5,100 SAY "Sponsored:  " + STR( nNoSponsored, 5, 0 )

    @  6, 21 SAY cAddress

    @  6,100 SAY "Qualified:  " + STR( nQualified, 5, 0 )

    if .not. empty( cAddress2 )
        @ 7, 21 SAY cAddress2
        nLine_no := 8
    else
        nLine_no := 7
    endif

    @ nLine_no, 21 SAY TRIM(cCity) + ",  "+ cState + "  " + cZip + "  " + =
    cFullName

    nLine_no += 2

    @ nLine_no,  4 SAY "LN LEVEL  I. D.     NAME"
    @ nLine_no, 70 SAY "SALES    BONUS    PCT"
    @ nLine_no, 93 SAY "PHONE          LAST ORDER  STATUS"
    @ nLine_no + 1,  4 SAY cLines
    nLine_no += 2

    nItem := 0

    RETURN NIL

* EOP: Prt_Header()

但是,如果您使用的是报告生成器,这不是您想要的。