Subscribe for automatic updates: RSS icon RSS

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

Pages: [1]
  Reply  |  Print  
Author Topic: int_flag always true when exiting report  (Read 7267 times)
Carlos L.
Posts: 20


« on: September 06, 2017, 06:46:11 pm »

I noticed that when using a report Genero only gives us two chances to exit the report, stop button or closing the window.

Both those options set int_flag to true.
Is there any way to show a report and leave with int_flag to false?

I'm using Genero BDL 2.50.16(tested with 3.00.04 too)

The program I used as an example was the following:
Quote
main

        start report reportFileToScreen to screen
        output to report reportFileToScreen("x")
        finish report reportFileToScreen

        if int_flag then
            display "INT_FLAG"
        else
            display "OK"
        end if


end main

report reportFileToScreen(theFile)
define
    theFile                         char(18)

    output
        left margin     0
        top margin      0
        bottom margin   0
        page length     64

format
    on every row
        print file theFile

end report
Reuben B.
Four Js
Posts: 1046


« Reply #1 on: September 07, 2017, 01:26:52 am »

So you understand what is going on, when you do a START REPORT TO SCREEN, the program is flowing through FGLDIR/lib/fglreport.42m, and you can find the source for this in FGLDIR/src/fglreport.4gl. 

Some customers do modify this and override FGLDIR/lib/fglreport.42m so that they can provide a better experience for their users when doing a START REPORT TO SCREEN.

Looking at the code I can see where int_flag is set.  If you were to modify this, just make you consider the difference between a 10 page report where the user views all 10 pages and the case where user exits after viewing 5 pages.  Looking at the code I don't think we have this right and that may require some investigation at our end.

Reuben


Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Carlos L.
Posts: 20


« Reply #2 on: September 07, 2017, 10:15:43 am »

I don't have the src folder on FGLDIR on my enviroment, so I can't really see what's happening on "START REPORT".

My simple approach to this was keeping the saving the int_flag value before "START REPORT" and putting it back to that value after the REPORT.

Bernard M.
Four Js
Posts: 45


« Reply #3 on: September 07, 2017, 10:42:50 am »

Hi,

FYI, we registered FGL-4693 to work on this issue.

Regards,
Bernard
Carlos L.
Posts: 20


« Reply #4 on: September 08, 2017, 10:22:22 am »

Thank you!
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines