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

RE: [sqr-users] SQR-4503 Errors with 0 line offset in print command



Try putting the plus sign in front of your offset variable: 
(+#LineOffset,,0)
 
One line of your code is  "LET #LineOffset = +1".  In that situation,
the plus sign doesn't count.  SQR is simply treating that as the value
1.  You need to code the plus sign in the PRINT offset to tell SQR that
it's a relative offset and not an absolute position.
  
 
Kevin Reschenberg
SparkPath Technologies, Inc.

sparkpath.com | sqr-info.com

 
-------- Original Message --------
Subject: [sqr-users] SQR-4503 Errors with 0 line offset in print
command
From: "Howard Thompson" <thompsoh@ohsu.edu>
Date: Tue, July 12, 2005 8:54 am
To: sqr-users@sqrug.org

(There is probably a way better way to accomplish what I'm trying to
do...; if so, let me know).

I have a report that lists a person's name and from 0 to many messages
for/about the person.

Person Name            Message
=====================  ===================================
Abel, Alan             This is message 1 for Alan
                      This is message 2 for Alan
Builder, Betty         This is the only message for Betty
Corva, Charles         
Davis, Danielle        This is message 1 for Danielle
                      This is message 2 for Danielle

As I go through the process for a person, I store the messages in an
array and at the end of the person
I print the name and then loop through the array to print any
accumulated messages.

On my first message for a person, I want the line offset to be 0; for
subsequent messages, I want the line offset to be +1

I tried the followoing and got the SQR 4503 error (presumably because if
the line offset is a variable it can't be 0)

PRINT $fmt_name        (+1, )

Let #LineOffset = 0
LET #AryIdx = 0
WHILE #AryIdx <= #AryLimit                 ! AryLimit is the number if
messages
 GET $RptMsg FROM MsgArray(#AryIdx) Msg
 PRINT $RptMsg              (#LineOffset, , 0)
 LET #LineOffset = +1
 ADD 1 TO #AryIdx
END-WHILE 

The only way I can get it to work is this:

LET #AryIdx = 0
WHILE #AryIdx <= #AryLimit
 GET $RptMsg FROM MsgArray(#AryIdx) Msg
 IF #AryIdx = 0                                ! First message
   PRINT $RptMsg              (0, , 0)
 ELSE
   PRINT $RptMsg              (+1, , 0)
 END-IF
 ADD 1 TO #AryIdx
END-WHILE

I appreciate any ideas.

--
Howard Thompson
Senior IS Project Lead
Oregon Health & Science University
thompsoh@ohsu.edu
503-494-5936



_______________________________________________
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