Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Undesired records showing up for other years
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
Undesired records showing up for other years
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Divers
Thread ID:
01248669
Message ID:
01248669
Vues:
67
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
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform