KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: 64-Bit Quick Report On Load Behavior
PRODUCT: 4D | VERSION: 17 | PLATFORM: Mac & Win
Published On: August 9, 2018

Transitioning to 64-bit has required some changes and reworks in 4D. On of the updates is to the 64-Bit version of the Quick Report area to be placed on a form. The quick report area used to be plugin area based and is now subform based.
Because of this change, the Quick Report area is not loaded until after the On Load event completes.

For Example if there is a Quick Report area with the variable qrArea assigned to it:


Then in the form method with the following code:

Case of
   : (Form event=On Load)
     onLoadVar:=qrArea
     SET TIMER(1)
  
   : (Form event=On Timer)
     onTimerVar:=qrArea
     TRACE
     SET TIMER(0)
End case


The results of the variables show that the value of qrArea is not loaded with the Quick Report area's reference during the On Load event:


So interacting with the Quick Report during the On Load event should not be performed and it should instead be performed after.
An easy way to perform a similar task is to use the On Timer event and triggering it through the On Load event.

Case of
  : (Form event=On Load)
       //... Some other code
     SET TIMER(1)
   flagQR_bool:=True
       //...

  : (Form event=On Timer)
       //...
     If(flagQR_bool=True)
       //Quick Report Code
     End if
       //...
End case