×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Calculated field in report not show correct decimals

Calculated field in report not show correct decimals

Calculated field in report not show correct decimals

(OP)
Hi All,

Hoping someone can help me with an issue I am having with a report I wrote for one of my departments.

The report is an audit report to verify that all that all the records for players in a charity golf tournament are being pulled correctly by the application before the user moves onto the next step.

The teams consist of 3 individuals each, the report prints a list of all players in each team sorted by the sponsoring company or individual.

At the bottom of the report I added a field to do a count on the player name field so the user can see the number of records pulled, which also happens to be the number of players as the table the report is based on only contains players. The count is Count(Master.PRT_NAME). For the test I am doing it returns a total of 148 records, which is correct.

The next field I created lists the number of teams. This allows the end user to determine if all the teams are being pulled correctly. I created a calculated field which is

Count([MASTER.PRT_NAME])/3 The number format for the field is set to Windows# ie xx.xx.

If results of this calculated field is an even number then youre golden, if not then youre missing player(s) from one of more teams and need to go back and check your data entry.

When I run the report against my test table it returns the correct number of records, (players) 148, but the calculated field for the number of teams shows up as 49.00 which is incorrect as 148/3 equals 49.33333, I only need a two digit decimal as any uneven number is sufficient to show there are missing players.

I have tried the various different available number formats for the field and none of them show the correct value.

Can someone give me some insight into what I am doing wrong/missing?

Thanks

Gordon

RE: Calculated field in report not show correct decimals

Just a thought and I haven't tested it,
Count returns an integer data type, Performing the division Count([MASTER.PRT_NAME])/3 will likely also imply a return value that is an integer. Can you use the NUMBER() function in the calculated field(I haven't tried) Maybe the calculation would look like this Number(Count([MASTER.PRT_NAME]))/3

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close