[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
[sqr-users] SQR-4503 Errors with 0 line offset in print command
- Subject: [sqr-users] SQR-4503 Errors with 0 line offset in print command
- From: "Howard Thompson" <thompsoh@ohsu.edu>
- Date: Tue, 12 Jul 2005 08:54:04 -0700
- Delivery-date: Tue, 12 Jul 2005 10:55:03 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <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, {COL01})
Let #LineOffset = 0
LET #AryIdx = 0
WHILE #AryIdx <= #AryLimit ! AryLimit is the number if messages
GET $RptMsg FROM MsgArray(#AryIdx) Msg
PRINT $RptMsg (#LineOffset, {COL02}, 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, {COL03}, 0)
ELSE
PRINT $RptMsg (+1, {COL03}, 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