Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Arturo Castro
  Where is Arturo Castro?
 Yaritagua
 Venezuela
 Arturo Castro
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: Error in Reports INT() function
Thread ID: 331449 Message ID: 331537 # Views: 20 # Ratings: 0
Version: Visual FoxPro 7 Category: Reports and Printers
Date: Friday, December 30, 2011 9:27:45 PM         
   


> > Hi:
> > Problems with Report
> >
> > Suppose you have a table: SALES.DBF with a field: price_1 (Num 8,2) and some 800 records.
> > Then in the Report footer you put a numerical field: price_1 and calculation sum it.
> > In the Report Expression you put INT(price_1/5). Divide by 5 to get some decimals
> >
> > Somehow the INT() integer funtion does not work.
> > It gives you a wrong number. I have gotten a diference of 3.
> > For example the value without INT is like 31.567, and the value with INT() is like 29.
> >
> > Please if anyone can help I will appreciate it.
> >
> > Thanks.
>
>
>
>
> Maybe there is something in your formula that causes that and not the INT(). Try this on your end:
>
>
MESSAGEBOX(157.835/5)  && 31.567
> MESSAGEBOX(INT(157.835/5))  && 31
> 

>
>
> http://sandstorm36.blogspot.com
> http://weblogs.foxite.com/sandstorm36/default.aspx

If you add int(price/5) into report expression and sum it, it will sum int-egered values.
>
> If you need int() the result, add a variable to report, sum it, and on the footer put int(m.var/5) without summing.
>
>
> hth
> Martin

The problem was what Martin Krivka said, although somehow the formula was wrong too.

Thank you too for taking your time to help me.
My email: arturocastro58@gmail.com
If I can help you anyway just let me know. thanks again.

ENTIRE THREAD

Error in Reports INT() function Posted by Arturo Castro @ 12/30/2011 2:13:40 AM
RE: Error in Reports INT() function Posted by Jun Tangunan @ 12/30/2011 2:50:38 AM
RE: Error in Reports INT() function Posted by Arturo Castro @ 12/30/2011 9:27:45 PM
RE: Error in Reports INT() function Posted by Martin Krivka @ 12/30/2011 8:22:03 AM
RE: Error in Reports INT() function Posted by Arturo Castro @ 12/30/2011 9:20:43 PM