[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] RE: On-break (lowest level identical while level above breaks)
- Subject: [sqr-users] RE: On-break (lowest level identical while level above breaks)
- From: "White, Denise" <DEWhite@vicr.com>
- Date: Fri, 23 Jan 2004 09:43:19 -0500
- List-id: This list is for discussion about the SQR database reporting language from Hyperion. <sqr-users.sqrug.org>
- Thread-index: AcPhvnLhWDxCLNR6Qn+YaUYsvl6A/w==
- Thread-topic: RE: On-break (lowest level identical while level above breaks)
Hi Fred,
I'm not really sure how to help, as the way you have constructed the breaks
appears to be correct, and your assumptions as to how they should work are also
correct. If you have a break at level 2 (afd2 to afd3) without any break at
level 3, it should still perform the break logic. First it would do the logic
associated with your level 3 break, and then the logic associated with your
level 2 break (i.e. it 'clears' all lower-level breaks ['lower-level' being
those with a higher level #]). Could it be something in the break procedures
themselves that is making it appear that there has been no break? I've never
seen on-break used when retrieving data from an array, only with data returned
from a select, but I assume from what you are saying that it is working in
general with just this one problem.
BTW, I was wondering as I read the beginning of your message how you could
possibly be selecting data from an array with a begin-select. I am not sure if
you abbreviated the logic when you wrote your message, but there is really no
reason at all for you to have that begin-select procedure, as you are not
actually selecting anything. You could do your array logic within a regular
begin-procedure paragraph.
Denise M. White
Sr. Software Engineer
Vicor
--__--__--
Message: 6
From: "Brandt, Fred" <fred.brandt@cz.nl>
To: "'sqr-users@sqrug.org'" <sqr-users@sqrug.org>
Date: Thu, 22 Jan 2004 16:00:36 +0100
Subject: [sqr-users] On-break (lowest level identical while level above breaks)
Reply-To: sqr-users@sqrug.org
Hi,
System:
Peoplesoft 7.5 HRM
Database: MsSQL 7.0
SQR: 4.3.4
In my code I use ON-BREAK with three levels. The data is in an array and is
selected by a begin-select. In this select-statement is a WHILE-construction
to get all the
data from the array row by row.
The lowest level (level=3) in the ON-BREAK-statement can be empty (value =
"").
I will show a part of the code:
*********************************************************************
let #idx4 = 0
begin-select loops=1
'X'
WHILE #idx4 <= #ar_rs_total_records
get $divisie_id_rs $divisie_descr_rs $afdeling_id_rs $afdeling_descr_rs
$groep_id_rs $groep_descr_rs $emplid_rs $sex_rs #fte_rs #teller_zv_emplid_rs
#freq_rs #noemer_zv_emplid_rs #noemer_zd_emplid_rs #teller_zd_emplid_rs
from result(#idx4)
ar_rs_divisie_id ar_rs_divisie_descr ar_rs_afdeling_id
ar_rs_afdeling_descr ar_rs_groep_id ar_rs_groep_descr ar_rs_Emplid ar_rs_Sex
ar_rs_fte ar_rs_teller_zv_emplid
ar_rs_freq_emplid ar_rs_noemer_zv_emplid ar_rs_noemer_zd_emplid
ar_rs_teller_zd_emplid
let #idx4 = #idx4 + 1
print $divisie_descr_rs () ON-BREAK PRINT=never
AFTER=DIV_BREAK LEVEL=1 SAVE=$OLD_DIV skiplines=1
print $afdeling_descr_rs () ON-BREAK PRINT=never BEFORE=set-teller
AFTER=AFD_BREAK LEVEL=2 SAVE=$OLD_AFD skiplines=1
print $groep_descr_rs () ON-BREAK PRINT=never
AFTER=GRP_BREAK LEVEL=3 SAVE=$OLD_GRP skiplines=1
do compute-totals
END-WHILE
from PS_ABS_TYPE_TBL
end-select
************************************************************************
NB: structure of the data in the array concerning the first 3 fields (i.e.
the ON-BREAK-fields) :
divisie_descr_rs afdeling_descr_rs groep_descr
div1 afd1 grp1
div1 afd1 grp2
div1 afd2 "" = <empty>
div1 afd3 "" = <empty>
div2 afd4 grp6
etc.
Result for div1: totals from afd2 and afd3 will be summarized, because there
is no group-break on $groep_descr_rs.
One possibility (work-around): fill the <empty> values with a value (for
example '0' and the next empty value '1' and the next empty value '0' etc).
In that case the BREAK will occur on the group-level (level=3).
But in the rest of the code I have to make lots of adjustments if I choose
this work-around.
What I am looking for is a way to let SQR 'see' that when a break on a
higher level occurs, it must automatically Break there, even when there is
no break on a lower level.
Can anyone help me?
Thanks,
Fred Brandt
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users