Quick Report has been completely redeveloped in 64 bits and features are continuously being integrated. In addition to the UI improvements shipped with the previous R-release, 4D v17 R6 adds the ability to catch events in standalone reports, as well as to manage subtotal spacing.
Call method in the QR REPORT command
You can now set the “methodName” parameter in the QR REPORT command. This method is a callback that runs on each managed event:
- qr cmd open
- qr cmd save
- qr cmd save as
- qr cmd generate
- qr cmd page setup
- qr cmd print preview
Here’s a call example:
QR REPORT([MyTable];Char(1);"qrCallbackMethod")
In the callback method, you can intercept all of the managed events, do what you have to do, and execute the event with the QR EXECUTE COMMAND command.
Here’s a callback method example which sets the current timestamp in the footer of the document before generating it, and filters the preview event:
C_LONGINT($1;$2)
C_LONGINT($zone;$event)
$zone:=$1
$event:=$2
Case of
: ($event=qr cmd generate)
QR SET HEADER AND FOOTER($zone;2;"";Timestamp;"";100)
QR EXECUTE COMMAND($zone;$event)
: ($event=qr cmd print preview)
Else
QR EXECUTE COMMAND($zone;$event)
End case
Reminder
Subtotal Spacing
Now for each break (subtotal), you can set either a page break or a different line height. In the case of a different line height, the difference can be expressed in points (pt) or percentage (%):