Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FoxFile -> XLS and the number 65535
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire de rapports & Rapports
Versions des environnements
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Divers
Thread ID:
01023249
Message ID:
01023678
Vues:
11
Known way that SELECT works. If the first value the SELECT pulls is 0, the field would only be 1 numeric wide, not large enough for your use. Setting the field to a 0 value as you've disccovered with the proper width fixes it. In VFP9, this can be dealt with using the CAST() function.

>OK, Gurus... here is the answer... and you are not going to like it!!!
>
>The problem is when I use this statement...
>
>IIF(BETWEEN(transdate,DATE()-30,DATE()),FRMAST.BALDUE,0) AS BAL30,;
>
>
>It generates the bad output....
>
>yet this code works ok....
>
>
>IIF(transdate <DATE()-90,FRMAST.BALDUE,0) AS BAGE90P
>
>
>Is the BETWEEN the culprit? No... because I can do things like this...
>
>IIF(BETWEEN(date(),DATE()-30,DATE()+30),FRMAST.BALDUE,0) AS BAL30,;
>
>
>And the baldue date comes over fine.... doesn't overflow....
>
>What could be wrong? Well, I used my data insead of the user's to get another look at it...and saw that the output contained *, 0, 1,2,4,8 but never a number greater than 9.
>
>Strange, eh? And it appeared to be rounding the number baldue, but only if that number was less than 10..... AHA!!!
>
>Somehow, the BETWEEN was ROUNDING off the BALDUE, but only if it was pulling the value to compare FROM the table!!!! And where was it getting the MASK to set the output width to? FROM the STINKING 0 in the BETWEEN clause!!!
>
>So.... changing the statement to this....
>
>IIF(BETWEEN(transdate,DATE()-30,DATE()+30),FRMAST.BALDUE,000000.00) AS BAL30,;
>
>
>pulls the BALDUE over, and MASKS the output correctly!!!!
>
>But notice... there is no need for this 000000.00 in the following...
>
>IIF(transdate <DATE()-90,FRMAST.BALDUE,0) AS BAGE90P
>
>
>ONLY IF THE BETWEEN is PULLING FROM A TABLE!!!!
>
>KEN.... BUG perhaps????
>
>Normally, now this would not be a problem... but the SQL is generated by FOXFIRE, so that creates a little bit of a problem (maybe a big problem at the moment). I will go into FoxFire and see if I can set the value of 0 to 00000.00 there to get around this "anomaly".
>
>>Hey Gurus....
>>
>>Got any FoxFire and Excel gurus here? Hope so...!!!
>>
>>Weird thing.... a user is running one of our custom FoxFile reports, which gathers up records to output to an Excel spreadsheet.
>>
>>Is 3 of the columns, we see the number 65535 in many of the records. I mean MANY records.
>>
>>Does the number 65535 have significance to FoxFire, or to Excel for a column.
>>
>>Ideas?
>>
>>Thanks!!!
Fred
Microsoft Visual FoxPro MVP

foxcentral.net
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform