Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Yuri Rubinov
  Where is Yuri Rubinov?
 Philadelphia
 Pennsylvania - United States
 Yuri Rubinov
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: Rounding an AVG for totals - HOW TO?
Thread ID: 188962 Message ID: 188969 # Views: 2 # Ratings: 1
Version: Visual FoxPro 9 Category: Reports and Printers
Date: Tuesday, August 12, 2008 8:18:41 PM         
   


> Colleagues,
>
> Short of doing it myself and adding extra recs with subtotals and/or totals - how do I make the report engine (behavior of VFP8) to display rounded averages (or any other calculated fields, for that matter)?
>
> I set the Calculate to AVG in the Report Designer, and it showed me 89.9. I know that requestor would like to have it rounded (i.e. shown like "90"). I "encapsulated" the field with the ROUND( ) - no effect, still shows 89.9.
>
> I even tried opening the FRX as a table and looking for the record where "AVG" is present in the Expr field - none found. Neither had I any success with "CALC".
>
> Could anybody tell me how to set a field in a report to show rounded number?
>
> TIA!
>
> Regards,
>
> Ilya

Ilya,

Add a report variable, set it as needed (Value to store, calculation type, reset..). Then add a report field with expression round(variable_name,0)

Best Wishes,

Yuri Rubinov

ENTIRE THREAD

Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/12/2008 7:54:27 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Anders Altberg @ 8/12/2008 7:58:15 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/12/2008 8:42:07 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Anders Altberg @ 8/12/2008 9:29:56 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/12/2008 9:52:22 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Yuri Rubinov @ 8/12/2008 8:18:41 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/12/2008 9:04:29 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Yuri Rubinov @ 8/12/2008 9:27:40 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/12/2008 9:59:50 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Yousfi Benameur @ 8/12/2008 9:56:35 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/12/2008 10:05:39 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Yousfi Benameur @ 8/12/2008 11:19:38 PM
RE: Rounding an AVG for totals - HOW TO? Posted by Ilya Rabyy @ 8/13/2008 5:02:30 PM