473,385 Members | 1,888 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help: Counting Records for a report

I have a table with records of games played with a field for players
name and another fields is a "WinorLose". One player may play several
games to complete a match. I want my report to tell me how many Wins
or Loses and Individual has in a match..

I'm not having a problem getting the reports and the grouping it by
person but I'm having a problem with the logic of counting and display
number of Wins and number of Loses.

Is there some way to say "if WinorLose="Win" then WinCount =
WinCount+1 else LoseCount = LoseCount+1" then display these numbers in
my report?
Thanks
Norris

x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 90,000 other groups
x-- Access to over 800 Gigs/Day - $8.95/Month
x-- UNLIMITED DOWNLOAD

Nov 12 '05 #1
2 2066
N. Graves <ng*****@yahoo.com> wrote in message news:<84********************************@4ax.com>. ..
I have a table with records of games played with a field for players
name and another fields is a "WinorLose". One player may play several
games to complete a match. I want my report to tell me how many Wins
or Loses and Individual has in a match..

I'm not having a problem getting the reports and the grouping it by
person but I'm having a problem with the logic of counting and display
number of Wins and number of Loses.

Is there some way to say "if WinorLose="Win" then WinCount =
WinCount+1 else LoseCount = LoseCount+1" then display these numbers in
my report?
Thanks
Norris


do something like in your query and then do a running sum?

Win = iif([GameResult]="Win",1,0)
Losses = iif([GameResult="Loss",1,0)

then you could do a running sum over the group...
Nov 12 '05 #2
On 30 Oct 2003 21:15:33 -0800, pi********@hotmail.com (Pieter Linden)
wrote:
N. Graves <ng*****@yahoo.com> wrote in message news:<84********************************@4ax.com>. ..
I have a table with records of games played with a field for players
name and another fields is a "WinorLose". One player may play several
games to complete a match. I want my report to tell me how many Wins
or Loses and Individual has in a match..

I'm not having a problem getting the reports and the grouping it by
person but I'm having a problem with the logic of counting and display
number of Wins and number of Loses.

Is there some way to say "if WinorLose="Win" then WinCount =
WinCount+1 else LoseCount = LoseCount+1" then display these numbers in
my report?
Thanks
Norris


do something like in your query and then do a running sum?

Win = iif([GameResult]="Win",1,0)
Losses = iif([GameResult="Loss",1,0)

then you could do a running sum over the group...

Pieter Linden,
Thanks so much for your help. I took this information applied it and
it gave me the results I was looking for.

What a great Group and News Readers!!!

Thank You!
Norris

x-- 100 Proof News - http://www.100ProofNews.com
x-- 3,500+ Binary NewsGroups, and over 90,000 other groups
x-- Access to over 800 Gigs/Day - $8.95/Month
x-- UNLIMITED DOWNLOAD

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
1
by: leegold | last post by:
Show full header Is there any way to make relevance when using boolean mode more useful? If not, are there plans in the Fulltext development "todo" for making it useful? I'm thinking of just...
1
by: mjobrien | last post by:
Thanks for the hint Allen (see below). But I am already doing that count as total records read (5)in the report footer. That count is unduplicated for the record not for the field - student ID as...
1
by: geronimo_me | last post by:
Hi, I have a query that has the following fields: Business: ID Number: LastName: EmpNo: Hours1: Hours2:
1
by: N. Graves | last post by:
I have a table of education records. ex: recid Empl Course Title Complete 1 123 t123a 123 class A Y 2 123 t123b 123 class B Y 3 234 t123a 123 class A Y 4 345 t123b 123 class B Y etc
6
by: James Radke | last post by:
Hello, I have a multithreaded windows NT service application (vb.net 2003) that I am working on (my first one), which reads a message queue and creates multiple threads to perform the processing...
2
by: Viktor | last post by:
I have a problem with counting empty fields in table. For example: I have the field in which i coulld write several solutions. "done", "not done", "send", "not send" etc. In report i want to...
1
by: RussCRM | last post by:
I need some help getting unique records from our database! I work for a small non-profit homeless shelter. We keep track of guest information as well as what services we have offered for...
5
by: Kazoo | last post by:
I'm trying to capture the # of pages printed from a report to use on another report. There are several records that are not standard size, therefore I can't just count the records and deduce how...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.