[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: ON-BREAK Formatting Problems



Hi,
I am not sure about whether u can have 2 on-break's with the same
level number like u have level=2 twice in ur program. The unprinted
white lines that u r getting is due to the next-listing command used.
If used with No-advance then ur problem might be solved.
I hope this helps.
siva





---Gavin John Fowler <gfowler@OXFAM.ORG.UK> wrote:
>
> I have a problem with printing and wonder if I can pick your brains.
>
> We are using SQR 4 on NT 4.0 (sp3) against MS SQL Server 6.5 (sp4) and
> PeopleSoft 7.51
>
> Its like this:
>
> I am grouping on several levels using ON-BREAK and the output should
look
> something like this :
>
> Level1 : Data_Line
>
>      Level2 : Data_Line
>
>           Level3 : Data_Line
>
>                Level4 : Data_Line1
>                Level4 : Data_Line2
>                Level4 : Data_Line3
>                ......................................
>
>           Level3 Subtotal
>
>      Level2 Subtotal
>
> Level1 Subtotal
>
>
> My code for the print routine is  here
>
>
> Begin-Procedure 028_Data_Out
>
> SHOW 'IN DATA OUT 028'
>
> Let #AccPer = #AccPer +1
>
>
> BEGIN-SELECT
> TREE_NODE + '' + OXF_DESCR    &DESCRS
> OXF_PROJECT + ACCOUNT         &ACCS
> 'Account : ' + ACCOUNT   &ACC
> OXF_DESCR                &TDESCR1
> TREE_NODE                     &TREE_NODE1
> OXF_PROJECT                   &OXF_PROJECT1
> ACCOUNT                  &ACCOUNT1
> OXF_CONTRACT             &OXF_CONTRACT1
> OXF_ACTIVITY             &OXF_ACTIVITY1
> OXF_OPEN_BAL             &OXF_OPEN_BAL1
> OXF_CLOSE_BAL            &OXF_CLOSE_BAL1
> SOURCE                   &SOURCE1
> JOURNAL_ID                    &JOURNAL_ID1
> JOURNAL_DATE             &JOURNAL_DATE1
> TRANS_REF_NUM                 &TRANS_REF_NUM1
> JRNL_LN_REF                   &JRNL_LN_REF1
> DESCR                         &DESCR1
> MONETARY_AMOUNT               &MONETARY_AMOUNT1
> CURRENCY_CD                   &CURRENCY_CD1
> EXCHNG_RT_BNK            &EXCHNG_RT_BNK1
>
>      Let $DESCRS         = &DESCRS
>      Let $ACCS      = &ACCS
>      Let $ACC       = &ACC
>      Let $tdescr         = &TDESCR1
>      Let $treenode  = &TREE_NODE1
>      Let $oxf_project    = &OXF_PROJECT1
>      Let $oxf_acct  = &ACCOUNT1
>      Let #oxf_open  = &OXF_OPEN_BAL1
>      Let #oxf_close = &OXF_CLOSE_BAL1
>      Let $oxf_contract   = &OXF_CONTRACT1
>      Let $oxf_actv  = &OXF_ACTIVITY1
>      Let $jrnl_date = &JOURNAL_DATE1
>      Let $source         = &SOURCE1
>      Let $jrnl_id   = &JOURNAL_ID1
>      Let $jrnl_ln_ref    = &JRNL_LN_REF1
>      Let $trn_ref   = &TRANS_REF_NUM1
>      Let $jrnl_descr     = &DESCR1
>      Let #m_amt          = &MONETARY_AMOUNT1
>      Let $curr_cd   = &CURRENCY_CD1
>      Let #ex_rt          = &EXCHNG_RT_BNK1
>
>      Let #grnt_curr_amt  = #ex_rt*#m_amt
>
>      Print  $DESCRS           (+1,2) ON-BREAK PRINT = CHANGE/TOP-PAGE
> LEVEL=1
>      Print  $ACCS             (+1,10) ON-BREAK PRINT = NEVER LEVEL=2
>      Print  $ACC                   (,10) ON-BREAK PRINT =
CHANGE/TOP-PAGE
> LEVEL=2
>      Print  $oxf_project      (+1,2) ON-BREAK PRINT = CHANGE/TOP-PAGE
> LEVEL=3
>      Print  $oxf_contract          (,20)
>      Print  $oxf_actv              (,32)
>      Print  $jrnl_date             (,40)
>      Print  $source           (,55)
>      Print  $jrnl_id               (,61)
>      Print  $jrnl_ln_ref      (,75)
>      Print  $trn_ref               (,88)
>      Print  $jrnl_descr       (,90)
>      Print  #m_amt            (,110) EDIT 9999999999.99
>      Print  $curr_cd               (,125)
>      Print  #ex_rt            (,132)
>      Print  #grnt_curr_amt         (,140) EDIT 9999999999.99
>
>      Let #T3 = #T3 + &MONETARY_AMOUNT1
>      Let #T4 = #T4 + &MONETARY_AMOUNT1*&EXCHNG_RT_BNK1
>
>      Let #count=#count+1
>
>      NEXT-LISTING NEED =5
>
>
> FROM PS_OXF_028_JRNL_VW
> WHERE ACCOUNTING_PERIOD = #AccPer
>
> End-Select
>
> End-Procedure 028_Data_Out
>
>
>
>
> As it stands, the first 4 'Print' lines :
>
>      Print  $DESCRS           (+1,2) ON-BREAK PRINT =
> CHANGE/TOP-PAGELEVEL=1
>      Print  $ACCS             (+1,10) ON-BREAK PRINT = NEVER LEVEL=2
>      Print  $ACC              (,10) ON-BREAK PRINT = CHANGE/TOP-PAGE
LEVEL
>      Print  $oxf_project      (+1,2) ON-BREAK PRINT =CHANGE/TOP-PAGE
> LEVEL=3
>
> are causing 3 lines of whitespace to be inserted between each of the
detail
>  lines in Level4  (If I increase any of the values oin the Print
statements
>  the whitespace increases accordingly).
>
> Try as I may I cannot find a way round this. I have tried using
SKIPLINES =
> 1 at the end of the ON_BREAK clause but this does absolutely nothing
at all
> All I want are single-width spaces between the major-groups and no
spaces
> between the detail (level 4 ) lines
>
> PS_OXF_028_JRNL_VW is a view in a SQL Server 6.5 database running on
NT 4.0
>
>
>
> Thanks for any help,
>
>
> Gavin Fowler
>

_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com