[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Trouble with an array
- Subject: RE: [sqr-users] Trouble with an array
- From: "Knapp, Richard" <KnappR@umsystem.edu>
- Date: Wed, 19 Jul 2006 15:11:41 -0500
- Delivery-date: Wed, 19 Jul 2006 16:14:00 -0400
- In-reply-to: <s4be534f.090@gw.housing.umass.edu>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: Acara/bEFLTMVUU4TeSjlqbn8vbRhwAAzHmA
- Thread-topic: [sqr-users] Trouble with an array
Laura,
Here's a programming hint: use white space. For example:
Do Print_Data
if $Type <> 'No Roomate'
Let $PriEMPLID = &MA.UMH_PREF_ROOMMATE1
let $InputIdRM1=&MA.UMH_PREF_ROOMMATE1
Do Get_Name_OfPerson
if $Period <> $parm_proc_cd
let $printPeriod='('|| $Period || ')'
else
let $printPeriod=' '
end-if
let $RoommateName1=$Name || ' ' || $printPeriod
if isBlank(&MA.UMH_PREF_ROOMMATE2) or isnull(&MA.UMH_PREF_ROOMMATE2)
!**ISBLANK includes nulls**
let $InputIdRM2=&MA.UMH_PREF_ROOMMATE2
Let $InputIdRM2 = ''
Let $RoommateName2 = ''
Do Print_Roommate_Name
else
Let $PriEMPLID = ''
Let $InputIdRM2 = ''
Let $RoommateName2 = ''
Let $PriEMPLID = &MA.UMH_PREF_ROOMMATE2
let $InputIdRM2=&MA.UMH_PREF_ROOMMATE2
Do Get_Name_OfPerson
let $RoommateName2=$Name || ' ' || $printPeriod
Do Print_Roommate_Name
end-if
else
Print 'No Roommate' (+1,1) Bold
Print '=' (+1,1,140) fill
end-if
Richard Knapp
AITS - Reporting
University of Missouri
Locust Street Building
Columbia, MO 65201
573-882-8856
knappr@umsystem.edu
-----Original Message-----
From: sqr-users-bounces+knappr=umsystem.edu@sqrug.org
[mailto:sqr-users-bounces+knappr=umsystem.edu@sqrug.org] On Behalf Of
Laura Mayer
Sent: Wednesday, July 19, 2006 2:44 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] Trouble with an array
Afternoon,
I have an array that I am having a problem with. I only want to see the
it once for each person, what's happening is if the person has two
roommates it repeats the iteration again so each person with two
roommates gets listed twice.
I've posted the if statement that drives it below if someone could offer
some insight on how to fix this that would be great. Thanks in advance.
Laura
Do Print_Data
if $Type <> 'No Roomate'
Let $PriEMPLID = &MA.UMH_PREF_ROOMMATE1
let $InputIdRM1=&MA.UMH_PREF_ROOMMATE1
Do Get_Name_OfPerson
if $Period <> $parm_proc_cd
let $printPeriod='('|| $Period || ')'
else
let $printPeriod=' '
end-if
let $RoommateName1=$Name || ' ' || $printPeriod
if isBlank(&MA.UMH_PREF_ROOMMATE2) or isnull(&MA.UMH_PREF_ROOMMATE2)
let $InputIdRM2=&MA.UMH_PREF_ROOMMATE2
Let $InputIdRM2 = ''
Let $RoommateName2 = ''
Do Print_Roommate_Name
else
Let $PriEMPLID = ''
Let $InputIdRM2 = ''
Let $RoommateName2 = ''
Let $PriEMPLID = &MA.UMH_PREF_ROOMMATE2
let $InputIdRM2=&MA.UMH_PREF_ROOMMATE2
Do Get_Name_OfPerson
let $RoommateName2=$Name || ' ' || $printPeriod
Do Print_Roommate_Name
end-if
else
Print 'No Roommate' (+1,1) Bold
Print '=' (+1,1,140) fill
end-if
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users