6.20.2018

VFP9 SP2 Report Listener Bug Bites Again

Spoiler alert: it was all my fault.

While preparing to demo an app to a client on my laptop computer, I noticed the VFP9 SP2 "SET TALK ON" bug showed up when I ran reports. I knew about that bug (cathypountney.blogspot.com/2009/04/set-talk-appears-to-be-on-when-running.html), but thought I had resolved it long ago by correcting and recompiling the class library and replacing the reporting apps with the latest ones from VFPX (github.com/VFPX/ReportingApps).

For demo purposes, I run the app's EXE from the development folder where it’s compiled rather than installing the app the way it would be on the client's machines. What puzzled me was that the bug did not show up when I ran the EXE that way on my main desktop development machine, but it always showed up when I ran the identical EXE that same way on my laptop.

I double- and triple-checked my laptop machine, confirming that all copies of the _reportlistener class library had been corrected and recompiled and that the reporting apps in C:\Program Files (x86)\Microsoft Visual FoxPro 9\ were the updated versions. Everything checked out OK but still the bug persisted - not fatal, but ugly and certainly not something I wanted the client to see in a demo.

Realizing it was time to ask for help, I reached out to my friend and respected colleague Rick Schummer who quickly suggested I look for out-of-date copies of the reporting apps elsewhere on the laptop.

And of course that was it.

Although I had updated the reporting apps in C:\Program Files (x86)\Microsoft Visual FoxPro 9\, I had forgotten about C:\Program Files (x86)\Common Files\microsoft shared\VFP\. That folder had the updated reporting apps on my desktop machine, but old copies were still lurking in that folder on my laptop computer and were being used when I ran reports from the stand-alone compiled EXE.

Lesson 1: When configuring a new machine for VFP development work, be sure to replace the reporting apps in C:\Program Files (x86)\Common Files\microsoft shared\VFP\ as well as in C:\Program Files (x86)\Microsoft Visual FoxPro 9\ even if you don’t deploy from that folder.

Lesson 2: Don’t waste too much time before asking for help. Two brains are always better than one.

No comments: