NetTalk Central

Author Topic: Not so much NTW, but how to run text from one report page to another  (Read 2092 times)

Mike Grigsby

  • Sr. Member
  • ****
  • Posts: 380
    • Yahoo Instant Messenger - onthedotsoftware
    • View Profile
    • MyHomeAssets! Software (among others)
I'm surprised I've not ever run into this before, but I've got a long text field that takes as much as 3 pages to print. Is there an easy way to get it to flow from page 1 to 2 and 3 if needed?

More on topic: Originally my text field was an XHTML field, but I wasn't sure it would print right, so I changed it to just a text field. If I wanted to use XHTML, is that what the EXTEND field is on the report template? Then do I put HTML in that field to indicate it's HTML?
« Last Edit: December 08, 2008, 11:12:57 PM by Mike Grigsby »
Mike Grigsby
Credify Systems
Central Oregon, USA

charl99

  • Full Member
  • ***
  • Posts: 185
    • View Profile
    • Email
Re: Not so much NTW, but how to run text from one report page to another
« Reply #1 on: December 15, 2008, 05:43:19 AM »
Mike,

I assume this long text field have carriage returns in it...

Then do this:

1) create global equate for Carriage Return,

CRet                 equate('<0dh><0ah>')

2) create in you report one line memo field with 'Resize' Option on in my instance it was called l:attach).

3) Use this code:

          smem = clip(SR:Paragraph)
          cr = instring(CRet,clip(smem),1,1)           !Specially for Chris Fullbeck and his long Memo's...
          loop until cr = 0
            l:attach = sub(smem,1,cr-1)
            smem = sub(smem,cr+2,len(clip(smem))-cr)
            print(rpt:Memo)
            cr = instring(CRet,clip(smem),1,1)
          .
          if clip(smem) <> ''
            l:attach = smem
            print(rpt:Memo)
          .
        .

What you basically do is print paragraph for paragraph, so if you run out of space the next paragraph is on the next page.  I sometimes like to comment the guy with the problem into the code, so it was easy to find the information by searching on him!

Cheers

Charl