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

Re: Wrap functionality question



Try this:

begin-procedure remarks

let $old_uidy = ''
let $remarks = ''

begin-select
a.uidy             &uidy
a.remarks          &remarks () on-break level=1
print=never  before=bef_remarks

from mf_pr a
where a.uidy = $input_uidy
end-select
end-procedure


begin-procedure  bef-remarks
if $old_uidy = '' OR $old_uidy = &uidy
   let $remarks = $remarks ||' '||&remarks
else
   print $remarks (<n1>, <n2>) wrap 100, 4
line-height=10
   let $remarks = ''
   let $old_uidy = &uidy
end-if
end-procedure

It should work for multiple uidy's

HTH
--- Poonam Auluck <poonam.auluck@AMS.COM> wrote:
> HI All -
>
> I'm new to SQR and new to this group..this is a
> great site...I've already
> answered so many of my questions by searching the
> archives!!
> Hopefully, my question will be easy for some of you.
>
> I have one field called remarks, which is 255
> characters.  I'm unsure of
> how many spaces user will fill in.  There are three
> rows that I am pulling
> from my DB that I want to combine all the remarks
> together.
>
> My code looks something along these lines....
>
> begin-procedure remarks
> let #begin_remarks = 390
> begin-select
> a.remarks                  &remarks
>      print &remarks (#begin_remarks, 25)  wrap 100 4
> line-height=10
>      let #begin_remarks = #begin_remarks + 10
> from mf_pr a
> where a.uidy = $input_uidy
> end-select
> end-procedure
>
> I identified #begin_remarks = 390 in the beginning
> because I want to have
> all the remarks from the three rows printed out
> together.  If I hardcoded
> it in my select statement, I would have the three
> remarks printed out on
> top of each other.  That's why I put the let
> #begin_remarks =
> #begin_remarks + 10 statement, so that for each
> record it picks up, the
> remarks will begin printing on the next line. I had
> to put the wrap
> statement in because of the 255 characters. My space
> alloted for the
> remarks section doesn't have enough to fit 255 in
> one line.
>
> The problem is that it will print out the remarks
> fine for the first
> record, but then it will overlap the beginning of
> the second remark onto
> the wrapped text from the previous record.  Does
> that make sense??  I guess
> I'm wondering how to incorporate adding the lines
> wrapped so that it will
> advance nicely on the report.
>
> Any suggestions?? Any help is apprecited :o)
>
> Thanks,
> Poonam Auluck


__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com