Quick Report: Manage callback methods and subtotal spacing

Automatically translated from English
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

  •  If no callback method has been set in the QR REPORT command, the events are managed automatically.
  •  If a callback method has been set in the QR REPORT command, it’s up to you to execute the event or not. This lets you control essential events on standalone reports.

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 (%):

Avatar

• Product Marketing Manager •

Intissar joined 4D in 2017 as a Product Marketing Manager. She works closely with the product, marketing, engineering, and technical support teams to highlight the ‘why’, the ‘how’, and the ‘what’ of new and updated features to different audiences. This close proximity allows her to craft messaging frameworks, and write in-depth content and code samples for the 4D blog and website.

After graduating with an engineer's degree in Computer Science from VINCI university, Intissar worked in several startups as a software engineer. Her hands-on experience includes software specification, design, and development, user training and support, and team management.