Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: 1 [2]
  Reply  |  Print  
Author Topic: Page Length 0  (Read 30510 times)
Rene S.
Four Js
Posts: 112


« Reply #15 on: October 22, 2013, 10:20:20 am »

Hello, this topic begins with "I vaguley remember that Informix 4gl"...
Recent versions of Infomix c4gl raise  error -4375: "The page length is too short to cover the specified page header and  trailer lengths." when setting PAGE LENGTH to 0.
I remember differently: the BDS compiler was in some cases not as strong as the Infomix compiler. As an unexpected result, programmers could code "PAGE LENGT 0". 

I did a quick test with BDS 3.55.01.46. When setting PAGE LENGHT to 0 then every PRINT in ON EVERY ROW is surrounded by a PAGE HEADER and a PAGE TRAILER. Stephen, this is obviously not what you describe. BDS does not interpret 0 as infinite.

You can suppress empty lines at the end of the REPORT by setting the OUPUT option TOP OF PAGE "\f". This only helps when not having a PAGE TRAILER. BTW: yes, PAGE LANGTH is type of SMALLINT.

Stephen, please attach a simple example program + the generated output. Perhaps we can propose a solution after analyzing this example.

Rene

 

Stephen T.
Posts: 114


« Reply #16 on: October 22, 2013, 11:33:29 am »

Rene,
Apologies - the Informix reference was very vague - but I was talking about 15+ years back (I can't even recall the 4gl version) - not any recent version (I don't think I'm going mad either as I did google page length 0 and found posts on the IIUG (http://www.iiug.org/forums/classics/index.cgi/noframes/read/1573) and 'elsewhere' infering that certain version  of 4gl did have a similar 'feature' (or bug!) (http://www.databaseteam.org/6-informix/6931fb85106c3371.htm).

Anyway, this 'tester' code is all that is required to produced the attached output (this is not the full 1.3MB of the output - but the dates simply repeat with no spacing until the 'trailer' text) under BDS 3.55.01.40. Ignore the dialog bit - I was using that to show the effect of INT_FLAG.
MAIN
 DEFINE l_char                  CHAR(1),
        l_i                     INTEGER

 WHENEVER ANY ERROR CONTINUE
   
    START REPORT r_report TO PRINTER

    FOR l_i = 1 TO 70000
        OUTPUT TO REPORT r_report(TODAY+l_i)
    END FOR

    FINISH REPORT r_report


    LET INT_FLAG        = FALSE
    DISPLAY '(',FGL_GETRESOURCE('gui.uiMode'),')'

    WHILE TRUE
        MENU 'Hello'
            COMMAND 'One' 'Command One'
                DISPLAY 'One'

            COMMAND 'Two' 'Command Two'
                DISPLAY 'Two'

            COMMAND KEY(F5)
                DISPLAY 'F5 Pressed'
        END MENU
        DISPLAY 'INT_FLAG (',INT_FLAG,')'
    END WHILE
 END MAIN   



 REPORT r_report(p_date)
 DEFINE p_date                  DATE

 OUTPUT
    LEFT    MARGIN  0
    RIGHT   MARGIN  0
    TOP     MARGIN  0
    BOTTOM  MARGIN  0
    PAGE    LENGTH  0
     
 FORMAT
    FIRST PAGE HEADER
        PRINT 'This is a file extract'

    ON EVERY ROW
        PRINT COLUMN 1,'Date ', p_date USING 'dd mmm yyyy'

    ON LAST ROW
        PRINT 'Thie is the end of the data'
       
 END REPORT


As I was saying to Seb on the INT_FLAG front, if there is no equivalent in Genero, then that is no great issue - I just thought that I had missed settings. The project here is running on a 2.4 release anyway and needs to be in within the next two months, so there's no time to wait for a leter release of Genero - and I think I can get around the issue by individually working each report's layout that has this 'feature'.


* BDS2.txt (5.07 KB - downloaded 1082 times.)
Pages: 1 [2]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines