Thursday, April 9, 2009

SET TALK appears to be on when running reports with SP2

I've been using VFP 9 SP2 ever since it first came out which was a long time ago. Yeah, I know there was that nasty Data Group bug, but to me, the enhancements in SP2 far outweighed the negative. Now that Microsoft has released a hotfix for the Data Group bug, I'm hoping more developers jump on the bandwagon and start adopting SP2. That said, a colleague reminded me last night about a bug where text is echoed to the screen as if a mysterious SET TALK ON had been issued.

This is a bug, but it’s one that you can easily fix yourself. You see, some of the new enhancements in SP2 were not implemented in the core VFP exe. They were implemented with a creative use of several Report Listener subclasses that reside in the FFC directory. When you run reports with SP2, the default behavior is to utilize these Report Listeners instead of the base VFP Report Listener class. The bug exists in one of those classes so you can change it yourself.

Modify the fxListener class of the _ReportListener class library and change the code in the LoadReport method. Simply move This.setFRXDataSessionEnvironment() so it comes before This.createHelperObjects() and the problem is solved.  

If you’re running on Vista, however, you have to be aware of the Virtual Store and work around it. When you edit the fxListener class, Vista makes a copy of the _ReportListener class library in the Virtual Store and your modifications are actually saved there and not in the C:\Program Files\Microsoft Visual FoxPro 9\FFC directory as you expected. Because a Virtual Store is specific to each user, it means the change you just made only works for the login you’re currently using. As soon as you switch to another login, the changes don’t exist for that user. To permanently fix the bug, move the _ReportListener class library from your Virtual Store back to the C:\Program Files\Microsoft Visual FoxPro 9\FFC directory, overwriting the original. Also, be sure to delete the _ReportListener class library from the Virtual Store for all users. If you forget this step, those users could be accessing an old copy of the class library.

Wednesday, April 8, 2009

VFP 9 SP2 Hotfix Updated

The VFP 9 SP2 Hotfix which addresses the Report Data Group bug (download from http://code.msdn.microsoft.com/KB968409) has been updated. This latest file includes the missing VFP9T.DLL (Multi-threaded runtime) file. In addition, the other hotfixes are no longer password protected.

Saturday, April 4, 2009

Installing VFP 9 SP2

Now that Microsoft has related the HotFix for the Report Data Group bug (read about it here), developers who have been holding off are now upgrading to VFP 9 SP2. This is great and I'm glad to see it. However, I'd like to take the time to remind everyone about some "gotchas" that might happen if you don't follow the right procedure when upgrading. 

If you have VFP 9 SP1 installed on your machine, there's a problem with the installation when upgrading from SP1 to SP2. It doesn't tell you there's a problem, but it doesn't fully install everything. The recommended procedure is to completely uninstall VFP 9 from your machine. Then re-install VFP 9, without any service packs. Once that step is completed, install Service Pack 2. Do NOT install SP1 .. skip that entirely. Just go straight to SP2. 

If you are running Vista, you also have to remember about the Virtual Store so as not to get bitten. Whenever you change a file in the Program Files directory, Vista creates a copy in your Virtual Store and redirects all future access to the new file. When Visual FoxPro opens a class, it does something that makes the O/S think it's been changed. Therefore, if you have ever opened any classes in VFP's FFC directory, those classes are now copied and sitting in your Virtual Store. That means when you upgrade to SP2, it installs new FFC files in the Program Files directory, but Vista keeps referring to the old ones in the Virtual Store whenever you access them. It completely ignores the new ones loaded with SP2. To get around this, delete the files from your Virtual Store ... HOWEVER ... if you have actually changed any of the FFC classes, you'll need to make copies of the files in the Virtual Store before deleting them so you can go back and compare your changes to the new SP2 versions and merge as needed.  

For those of you who want to install SP2 and still keep plain-Jane VFP 9 or VFP 9 SP1, that's not a problem. Rick Schummer wrote a great whitepaper that explains how to do this (Rick's whitepaper). 

VFP 9 SP2 Hotfix Minor Glitch

A few days ago I blogged about Microsoft releasing a hotfix for the VFP 9 SP2 Report Data Group bug (read it here). Last night, Rick Schummer blogged about a slight glitch with the hotfix and let us all know that Microsoft will have a resolution quickly. Instead of repeating what he said, I'll just point you to his blog post: (read it here). 
 

Thursday, April 2, 2009

Microsoft fixes Data Group Bug in Reports!

Woo Hoo!!   Yippee!!  Hooray!!  I'm jumping for joy!!

I'm extremely excited to let everyone know that Microsoft has fixed the serious Data Group bug in VFP 9 SP2 reports which I blogged about here. The bug is officially described in the following Microsoft KB article, where you'll also find detailed instructions on how to get the fix. 

FIX: The group header of a data grouping is not printed at the top of each page as expected after you intall Microsoft Visual FoxPro 9.0 Service Pack 2 (968409)

I've heard lots of developers say they've held off upgrading to SP2 because of this one bug. So those of you that fall in this category .. it's time to upgrade!! There are no more excuses!! 

Several people in the FoxPro Community, myself included, worked hard at getting this bug fixed and spent a lot of time testing it. Please ... I don't want to hear any bitching from anyone about how long it took to get this. Instead, let's all focus on the positive side which is the fact that Microsoft listened and provided a fix to a serious bug.

P.S.  Read Rick Schummer's blog for more thoughts about this bug fix.