Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Undesired records showing up for other years
Message
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Undesired records showing up for other years
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01248669
Message ID:
01248669
Views:
65
The problem is that the program operates differently on another employee's PC than on anyone else's. His PC shows a SCRAP Report with years 2005 and 2006. No other PC does this with the same program. Is there some oddball setting on the PC that I should change? Or, is there something wrong with the below code? The DATE field is character, instead of DATE.

Here's my code:
* cmdPrint.Click()
*** 02/15/2007 Cecil Champenois. Need to clear the previous relations
*** if the user has already used one of the Option buttons below.
SELECT SCRAP
SET RELATION TO
*** 02/15/2007 Cecil Champenois. End.
WITH THISFORM
   DO CASE
   * Totals Only reporting for Scrap and Remnants.
      CASE .OptGrp1.optTotalsOnly.VALUE = 1
         SET ORDER TO Dept1
         SET FILTER TO ;
            LEFT(DATE,5)=>LEFT(DTOC(.txtBegDate.Value),5) AND ;
            LEFT(DATE,5)<=LEFT(DTOC(.txtEndDate.Value),5) AND ;
            SUBSTR(DATE,7,2)=SUBSTR(DTOC(.txtBegDate.Value),9,2) AND ;
            NOT remnant
         REPORT FORM ScrapDetailsRpt PREVIEW NOCONSOLE
         SET FILTER TO ;
            LEFT(DATE,5)=>LEFT(DTOC(.txtBegDate.Value),5) AND ;
            LEFT(DATE,5)<=LEFT(DTOC(.txtEndDate.Value),5) AND ;
            SUBSTR(DATE,7,2)=SUBSTR(DTOC(.txtBegDate.Value),9,2) AND ;
            remnant
         SET ORDER TO TAG dept1
         SET RELATION TO pn INTO remnant ADDITIVE
         REPORT FORM RemnantDetailsRpt PREVIEW NOCONSOLE

	* Details reporting for Scrap and Remnants.
      CASE .OptGrp1.OptDetails.VALUE = 1
         SET ORDER TO Dept
         SET FILTER TO ;
            LEFT(DATE,5)=>LEFT(DTOC(.txtBegDate.Value),5) AND ;
            LEFT(DATE,5)<=LEFT(DTOC(.txtEndDate.Value),5) AND ;
            SUBSTR(DATE,7,2)=SUBSTR(DTOC(.txtBegDate.Value),9,2) AND ;
            NOT remnant
         REPORT FORM ScrapReport PREVIEW NOCONSOLE
         SELECT REMNANT
         SET ORDER TO pn
         SELECT SCRAP
         SET FILTER TO ;
            LEFT(DATE,5)=>LEFT(DTOC(.txtBegDate.Value),5) AND ;
            LEFT(DATE,5)<=LEFT(DTOC(.txtEndDate.Value),5) AND ;
            SUBSTR(DATE,7,2)=SUBSTR(DTOC(.txtBegDate.Value),9,2) ;
            AND remnant
         SET ORDER TO Dept
         SET RELATION TO pn INTO remnant ADDITIVE
         REPORT FORM RemnantRpt PREVIEW NOCONSOLE
   ENDCASE
ENDWITH
Next
Reply
Map
View

Click here to load this message in the networking platform