When you click screen it commit records, so you might try adding a commit records. Refresh Windows may also help.
On a report layout, if you are using sub summary parts they must be set to summarise based on a sort, and you must make sure that the file is sorted by the relevant field in order for the data to show. Have you done that?
I ran into something similar yesterday that was annoying and perplexing.
A script that had run perfectly for several years after having been written in FileMaker 8.5 suddenly stopped performing in FileMaker 15. The script produces a found set of records that are processed in a loop when the found set is more than 1. The layout is in List View. In each of the loop iterations, some values are set in the parent record and also in the last portal row present on each record in the Body part. There is one summary fields in the Trailing Grand Summary part which presents the sum of a field in the parent records, as well as a second summary field in the same layout part which presents the sum of the values in a second field in the parent record. That second field in the parent record is a calculated total of its related child records in the portal.
Oddly, I observed was that when the script runs, it refuses to consider the last record when refreshing the 2nd summary field for the found set --- but if I use the Debugger to examine the script in a manual step-by-step approach, it works just as expected.
After tinkering for an hour or more with the insertion of new script steps that commit each record, or refresh each portal object, or pause for as long as 3 seconds, or refresh the window ---- I eventually gave up and inserted a Set Variable step that uses Execute SQL to determine the desired sum and then use that variable's value instead of the misbehaving summary field to complete the necessary steps that depend on the desired Sum value at the end of the Loop for the remainder of the script.
The client was satisfied to have the problem solved, but I was uncomfortable having the mystery remain unsolved.