Four Js Development Tools Forum

Discussions by product => Genero BDL => Topic started by: Carlos L. on September 06, 2017, 06:46:11 pm



Title: int_flag always true when exiting report
Post by: Carlos L. 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


Title: Re: int_flag always true when exiting report
Post by: Reuben B. 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



Title: Re: int_flag always true when exiting report
Post by: Carlos L. 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.



Title: Re: int_flag always true when exiting report
Post by: Bernard M. on September 07, 2017, 10:42:50 am
Hi,

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

Regards,
Bernard


Title: Re: int_flag always true when exiting report
Post by: Carlos L. on September 08, 2017, 10:22:22 am
Thank you!