[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] on-break and multi-line printing
- Subject: RE: [sqr-users] on-break and multi-line printing
- From: "Steve Cavill" <steve.cavill@infoclarity.com.au>
- Date: Sat, 28 Jan 2006 21:23:23 +1100
- Delivery-date: Sat, 28 Jan 2006 05:26:38 -0500
- In-reply-to: <5.1.0.14.0.20060126165405.01eb0038@pop.isisbio.com>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcYi4qMLTgzvW2NURra3z02t4CS/eABENCdg
What about a after=procedure
E.g.
observation (1,1) on-break print=change/top-page level=1 after=newobs
sex (2,3) on-break print=change/top-page level=2
group (,14)
Begin-procedure newobs
Next-listing skiplines=1 need=2
End-procedure
That would give the blank line between observations and prevent it being the
last line on the page
Steve.
-----Original Message-----
From: sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org
[mailto:sqr-users-bounces+steve.cavill=infoclarity.com.au@sqrug.org] On Behalf
Of David Donnelly
Sent: Friday, 27 January 2006 12:37 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] on-break and multi-line printing
Apologies in advance for the length of this post.
I have been programming SQR a very long time, but I have never gotten the
following to work. I always end up doing my own on-break
logic to get what I want. Seems silly to have to do that; someone here must
have done it right by now.
Consider the following data, which arrives in the order (observation, sex desc,
group) shown:
Observation Sex Group
=========================
Dopey M 1
Dopey M 2
Dopey M 3
Dopey F 1
Dopey F 2
Dopey F 3
Lazy M 1
Lazy M 2
Lazy M 3
Lazy F 1
Lazy F 2
Lazy F 3
Silly M 1
Silly M 2
Silly M 3
Silly F 1
Silly F 2
Silly F 3
I want to print like this:
Dopey
M 1
2
3
F 1
2
3
Lazy
M 1
2
3
F 1
2
3
Silly
M 1
2
3
F 1
2
3
That is, I want to skip a line when Observation changes, and then print the
Observation on a line by itself. Then I want to print
each sex-group combination on a line, but print the value of sex only when it
changes or at top-of-page. Of course I want to print
Observation again at top-of-page if that happens in the middle of an
Observation.
The closest I've gotten is this:
observation (+1,1) on-break print=change/top-page skiplines=1 level=1
sex (+1,3) on-break print=change/top-page level=2
group (,14)
This is almost right, except that it skips a line after every sex-group line;
apparently the "+1" spacing command is interpreted
whether or not the value of sex is printed. So I tried
observation (+1,1) on-break print=change/top-page skiplines=1 level=1
sex (,3) on-break print=change/top-page skiplines=1 level=2
groupnumber (,14)
that is, taking out the +1 and adding skiplines. This got rid of the blank
line between sex-group lines, all right, but the first
one doesn't skip, so it prints right on top of the observation line.
A further slight complication is that you don't want Observation to print as
the last line on the page, with the first sex-group on
the next.
Can anyone offer a solution? PLEASE, PLEASE don't dream something up and say
"try this." Believe me, I have tried everything I can
think of, including next-listing with and without need= and no-advance. It's
like squeezing Jello -- something always spurts out
somewhere else. But if you have solved this problem -- "always skip a line,
but print only on changes"
-- please tell me how.
Thanks to all for reading.
Dave
_______________________________________________
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