Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Succesors ReportListener objects
Message
 
To
11/10/2006 14:38:42
General information
Forum:
Visual FoxPro
Category:
Reports & Report designer
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP
Miscellaneous
Thread ID:
01161281
Message ID:
01161295
Views:
12
Hi Boban,

>I have tried to set property successor in main RL object and I have set property isSuccessor = .T. in successor RL object and I have put some code to change FontStyle in method EvaluateContents() in successor RL object but no change has happened. Both RL objects are ListenerType = 1.


There has to be code in the main ReportListener to call the EvaluateContents of the Successor.

If you are using the FFC ReportListener, you will see there is code in most methods (Render, BeforeBand, AfterBand, etc...) to call the Successor object's methods. However, there is is no code in the FFC ReportListener's EvaluateContents or AdjustObjectSize methods.
MODIFY CLASS _reportlistener OF (HOME(1)+"\ffc\_reportlistener")
This is because putting code in either of these methods can cause a performance hit to the report run. The ReportListener decides at run time if there is code in either of these methods and will not fire the event if there is no code. Because the successor object depends on the parent object to fire its events, your successor ReportListener's EvaluateContents and AdjustObjectSize methods are not getting fired.

If you were to add code similar to this in your parent ReportListener's EvaluateContents method it should work as you expected. But there will be a performance hit during the report run:
FUNCTION EvaluateContents(nFRXRecno, oObjProperties)

IF NOT ISNULL(THIS.Successor)
   THIS.SetSuccessorDynamicProperties()
   THIS.Successor.EvaluateContents( m.nFRXRecno, m.oObjProperties)
ENDIF
There will be a change in the next release of VFP to provide more control over this with the "CallEvaluateContents" and "CallAdjustObjectSize" properties. (see Sedna Overview Documents in the September 2006 Letter From The Editor on MSDN: http://msdn.microsoft.com/vfoxpro/letters/)
Previous
Reply
Map
View

Click here to load this message in the networking platform