Information générale
Catégorie:
Crystal Reports
Titre:
Picture updating problem SOLVED
Well, sort of. It seems the issue is the call to EVENTHANDLER at the end to release the handler from memory. If seems to happen too fast when the section of th report it is handling is too far down. However, sticking a WAIT WINDOW ahead of this line does NOT work - it pauses before executing the EVENTHANDLER but still fails. Commenting out the EVENTHANDLER makes it work.
BTW, this is with the sample code in Craig's CrysDev book. The line under the comment *Unbind the event handler. If the picture on the report is in a details section higher than about the 4th one, the code as written fails. The event DOES fire, as placing a few WAIT WINDOWS around will quickly prove. But the picture does not get updated. Comment out the line EVENTHANDLER(loSection, loEventHandler, .T.) and it works fine.
Now, what are the consequences? According to the VFP documentation, the event handler is automatically unbound when the COM object goes out of scope. Am I asking for trouble to expect VFP to handle this automatically?
Randy
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement