[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: RE: [sqr-users] array printing challenge
Re-posting 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
end-if
let $flag = 'Y'
add 1 to #ind
end-while
The first time around the name will be printed as follows:
print $instr_name (,4,15)
The second name and all subsequent names will be printed at + 1
positon...
********************************************
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
********************************************
----- Original Message -----
From: "Knapp, Richard" <KnappR@umsystem.edu>
Date: Wednesday, January 18, 2006 3:02 pm
Subject: RE: [sqr-users] array printing challenge
To: "This list is for discussion about the SQR database
reportinglanguage from Hyperion Solutions." <sqr-users@sqrug.org>
>
> I think this is a print challenge rather than an array challenge.
> Whatrow(s) do you imagine these array elements are being printed on?
>
> Richard Knapp
> Database Programmer/Analyst
> Institutional Research and Planning
> University of Missouri System
> 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
> Anya Mendenhall
> Sent: Wednesday, January 18, 2006 1:45 PM
> To: sqr-users@sqrug.org
> Subject: [sqr-users] array printing challenge
>
>
> 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
> ********************************************
>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
>
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