Wiki Home

Solutions To VFP 9 SP 2 Bugs


Namespace: VFP
This page was created so users may post their solutions / workarounds to VFP 9 SP2 Bugs

found here http://fox.wikis.com/wc.dll?Wiki~VFP9SP2BugList~Wiki
VFP 9 SP2 Hotfix updated (includes VFP9T.DLL) on MSDN Code Gallery (2009/04/07) http://support.microsoft.com/kb/968409
VFP 9 SP2 Hotfix released on MSDN Code Gallery (2009/04/02) http://support.microsoft.com/kb/968409
Updated Codeplex location: http://vfpx.codeplex.com/wikipage?title=VFP%209%20SP2%20Hotfix%203%20Download%20%28latest%20one%29&referringTitle=Home

FIX: The group header of a data grouping is not printed at the top of a page as expected
Microsoft has released a hotfix to the most serious Report Designer bug in VFP 9 SP2. This is the Data Group bug Cathy Pountney first blogged about here: Gotcha: Serious report bug with Data Groups introduced in VFP 9 SP2.

hotfix file version: 9.0.0.7423 23-Feb-2009

http://support.microsoft.com/kb/968409


1. Changes to the code in FFC\_reportlistener.vcx breaks SP1 reports that use Doug Hennig's SP-1 hyperlink technique- Fix

Sergey Berezniker sent me this fix for the above bug. This is the code missing from the SP2 classes:

<!--------- Add this --------- -->
<xsl:when test="string-length(@href) &gt; 0">
  <A href="{@href}">
  <xsl:call-template name="replaceText"/>
  </A>
</xsl:when>

<!-------------- Before this  ---------- -->
    <xsl:otherwise>
      <xsl:call-template name="replaceText"/>
    </xsl:otherwise>
    </xsl:choose>



-- Bernard Bout

2. Web Services Registration - If field returns NULL then error registering Web Service - _w3sutils.vcx _webservices.addfoxcode.

The bug occurs when you want to register a web service. It says that a field cannot accept a null. The table involved is foxws3.dbf. This does not happen with the same web service in either VFP8 or VFP9 Sp1 but does in SP2. I posted the fix for this on the UT which is here below:

a. Open the class HOME()+"ffc\_ws3utils.vcx" and select the _webservices class for editing
b. Open the method "addfoxcode"
c. Scroll down till you see this code:
lcServiceDoc = ""
THIS.cWSname = loService.Name
lcWSName = THIS.cWSname
lcServiceDoc = loService.Documentation  <<<--- this is the culprit

The above marked line sometimes returns a null and this is stored in lcServiceDoc, later on causing an error.

d. Change this offending line to:
lcServiceDoc = NVL(loService.Documentation,"")

-- Reported by Bernard Bout
3. Workaround for Data Group bug

try Cathy's solution [2007.12.04]
http://cathypountney.blogspot.com/2007/12/gotcha-workaround-for-data-group-bug.html
4. Groups in VFP Reports

try Bo Durban's workaround published on UT [2008.01.30]
...here is a technique of addressing the issue programatically by using the Report Listener class. It needs more testing, but it seems to work on a few of my reports I tested. (I know it is not ideal, but I think it is better than staying on SP1)

DEFINE CLASS rlFixGroup AS ReportListener

Groups = NULL



*************************************
FUNCTION BeforeReport()
  LOCAL loData AS Object
  LOCAL lnCnt
  ** Stuff all of our group bands into a collection
  This.Groups = CREATEOBJECT("Collection")
  SET DATASESSION TO (This.FRXDataSession)
  SELECT frx
  lnCnt = 0
  SCAN FOR INLIST(objcode,3,5)  && GroupHeader, GroupFooter
    DO CASE
    CASE objcode = 3   && GroupHeader
      lnCnt = lnCnt + 1
      loData = CREATEOBJECT("Empty")
      ADDPROPERTY(loData,"expr", frx.expr)
      ADDPROPERTY(loData,"currentvalue", "")
      ADDPROPERTY(loData,"applyfix", .F.)
      ADDPROPERTY(loData,"groupheaderid",RECNO())
      ADDPROPERTY(loData,"groupno",lnCnt)
      This.Groups.Add(loData,ALLTRIM(STR(RECNO())))

    CASE objcode = 5   && GroupFooter
      ** For our footer band, just use the header band but add
      ** it to the collection again so we can reference it by its key
      FOR EACH loData IN This.Groups
        IF loData.groupno=lnCnt
          ADDPROPERTY(loData,"groupfooterid",RECNO())
          This.Groups.Add(loData,ALLTRIM(STR(RECNO())))
          lnCnt = lnCnt - 1
          EXIT
        ENDIF
      ENDFOR
    ENDCASE
  ENDSCAN
  SET DATASESSION TO (This.CurrentDataSession)

ENDFUNC

*************************************
FUNCTION BeforeBand(nBandObjCode, nFRXRecNo)
  IF INLIST(nBandObjCode,3,5)
    WITH This.Groups(ALLTRIM(STR(nFRXRecNo)))
    DO CASE
    CASE nBandObjCode = 3   && GroupHeader
      ** First time through this grouping?
      ** Just add our expression value to the groups object



      IF EMPTY(.CurrentValue)
        .CurrentValue = EVALUATE(.expr)
      ENDIF
      ** Is the group expr value different?
      ** If so, our BUG had occured:
      ** Skip back 1 record and set a flag
      IF .CurrentValue != EVALUATE(.expr)
        SKIP -1
        .ApplyFix = .T.
      ENDIF
    CASE nBandObjCode = 5   && GroupFooter
      ** Reset the group expr value if our page footer occurs
      .CurrentValue = ""
    ENDCASE
    ENDWITH
  ENDIF
ENDFUNC

*************************************
FUNCTION AfterBand(nBandObjCode, nFRXRecNo)
  IF INLIST(nBandObjCode,3)   && GroupHeader
    WITH This.Groups(ALLTRIM(STR(nFRXRecNo)))
      ** Our BUG occured, set the record pointer back
      IF .ApplyFix
        SKIP 1
        .ApplyFix = .F.
      ENDIF
    ENDWITH
  ENDIF
ENDFUNC

ENDDEFINE

5. FIX: The toolbar on an SDI form is disabled in Visual FoxPro 9.0 Service Pack 2
A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Visual FoxPro 9.0 service pack that contains this hotfix. To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix.

hotfix file version: 9.0.0.6303 03-Mar-2008

http://support.microsoft.com/default.aspx?scid=kb;EN-US;948528
6. FIX: Records from another user session that violate the criteria for a parent table are displayed in the browse window for a child table in a Visual FoxPro 9.0 Service Pack 2 multiuser environment

hotfix file version: 9.0.0.6602 03-Jun-2008

http://support.microsoft.com/kb/952548

7. Really fixed VFP9 SP2 helpfile:

Rick Schummer blogged about http://rickschummer.com/blog/2009/01/vfp-9-sp2-help-file-fixed-coming-to.html

Community managed Visual FoxPro 9 SP2 Help file corrected, supported, and enhanced. Creative Commons licensing.
http://www.codeplex.com/VFPX/Wiki/View.aspx?title=VFP%209%20SP2%20Help%20File
8. Gap with multiple data groups on reports

A gap is printed when multiple data groups exist on a report and one is marked to reprint when the data group overflows to the next print.
https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=312572

Cathy Pountney developed neat workaround, please read her post here:
http://cathypountney.blogspot.com/2009/03/workaround-gap-with-multiple-data.html
Windows Vista border issue and SP2
http://blogs.msdn.com/yag/archive/2007/10/31/windows-vista-border-issue-and-sp2.aspx
Official response: but this is not an SP2 issue - there's nothing we can do about this in our SP.

Response to "there's nothing we can do":
http://blogs.msdn.com/yag/archive/2007/10/31/windows-vista-border-issue-and-sp2.aspx#5812848
( Topic last updated: 2015.05.31 11:59:08 AM )