Results 1 to 10 of 15

Thread: Current line in winreport2

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #15

    Default Re: Current line in winreport2

    Quote Originally Posted by Dennis Piccioni View Post
    Does that work for you?
    Dennis,

    We're still debugging it. To look at the logic it should work every time but it isn't working consistently. Our cWinReport2 reports are all built on a special subclass augmented for our app. So, it has a Page_Top, with a standard page header output for all reports. Each report also has a local Page_Top, to prepare in-context page heading strings, then it does a "forward send page_top" to actually process the new page. That's when, if the class-level Page_Top was triggered by the report's DFLineCheck, it should set piDidPageTop to "1".

    In the debugger, we watched property piDidPageTop which -again- should be set to "1" after a DFLineCheck ## that triggers a new page. But, sometimes it is NOT set to "1", when we know it triggered a new page. That's the current head scratcher. Because it sometimes does work, we know that everything will work once piDidPageTop is set to "1" or "0" as reliably as it should.

    Code:
     Set piDidPageTop to O
     DFLineCheck 12 // Page_Top sets it to 1
     If (piDidPageTop(Self)) Begin
        Move "Total for ~" to sTotalString 
        Move (Replace("~",sTotalString,(Trim(SRC.CODE)))) to sTotalString 
        DFWriteLn
        DFWritePos sTotalString 0.75  (FONT_LEFT + FONT_BOLD)
        DFWriteLn
        DFWriteLn
     End
     Set piDidPageTop to O
    The only explicit action setting it to zero is immediately after the conditional that outputs the special text we need on the report only when DFLineCheck triggered a new page.

    Nick
    Last edited by Nicholas Herlick; 25-May-2018 at 11:04 AM. Reason: added code sample
    Nicholas Herlick
    President
    Herlick Data Systems
    1348 Magnolia Ave
    Redlands, CA 92373
    Main: 909-798-2898, ext. 1
    Cell: 951-903-4177
    Fax: 909-792-9651
    Email: nick@memsys.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •