[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] array printing challenge
- Subject: [sqr-users] array printing challenge
- From: Anya Mendenhall <agueniss@gwu.edu>
- Date: Wed, 18 Jan 2006 14:45:16 -0500
- Delivery-date: Wed, 18 Jan 2006 14:47:25 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Priority: normal
Array challenge
Ok, I am not sure if this is possible in SQR. I have an array of
students that can store up to 16 names. I have defined my array as
follows:
create-array name=instr_arr size=100 field=last_name:char
When I put values into my array, I actually concatenate students name
along with a | and a certain indicator. So a value in my array might
look like this:
Liang|Y|
Jenn Doe|Y| Anna Smith|Y
Todd Bond|Y| Joe Shmoe|
The problem is that when I print out this array and the array has a lot
of names in it, the names wrap so that one part of the name is on one
line and the other part of the name is on the other line. Here is an
example:
Gallo|Y| Sarrafzdeh| Medghalchi| Swan| Shibata|
Daryabandari| Turkkan| Almarmoom| Liebes| Alhussaini| Bush| Vande
rhoek| Almidfa| Khan| Ahmadi-Sabet|
Do you see how Vanderhoek wraps around? How do I go about it? I need
to figure out if I am at the end of the line and go to the next? I
tried the wrap command, but it does not work, as I get the following
error:
Error on line 287:
(SQR 5304) Qualifier 'wrap' requires a numeric literal, variable, or
column.
print $instr_name (,+1) wrap 80, 2
Here is my code:
while #ind < {maxArraySize}
let $instr_name = instr_arr.last_name(#ind)
if ($flag = 'N')
print $instr_name (,4,15)
else
print $instr_name (,+1) wrap 80, 2 – this wrap command does not
work
end-if
let $flag = 'Y'
add 1 to #ind
end-while
Any ideas on how to go about this? Thank you!
********************************************
Anya Mendenhall
Enterprise Resource Planning Developer
Information Systems & Services
The George Washington University
44983 Knoll Square, Ste 380,
Ashburn, Virginia 20147
Tel No: 703-726-1970
Fax No: 202-994-5251
********************************************
Here was a non admissible message part of 'text/x-vcard' MIME type. It
has been automatically discarded before sending the message to the
list.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users