J
Jos Huijnen
I want to know how many "workplaces" there are and have that amount put in
the header of the report.
The report is build from two tables. The first table has a column which has
the name/code of the workplace (like WS4483). The second table is a
hardware list. Each device which is used on a specific workplace also has
that workplace name/code. In this second table that column has duplicate
entries (because a computer, monitor, printer all can have the same
workplace, so WS4483 can be used more than once). Each device has a
company-label with a code which is the HWCode.
The report looks like this....
Workplacename Username HWCode HWDescription
---------------------------------------------------
WS4483 John Doe
L-899 Compaq Deskpro EP
L-632 Eizo FlexScan F520
L-463 HP DesignJet 980
WS4497 Peter Pan
L-492 Compaq Deskpro EXD
L-211 Eizo FlexScan F520
If I use =count(*) all records are counted, which results in a total amount
of 5. But if I use =count([Workplacenaam]) this will also result in a total
of 5.
Workplacename and Username is from one table. HWCode and HWDescription
comes from a second table, which also has the field Workplacename, because
that is the field which links/connects those two tables.
As in the above example I want to know how many workplaces there are.
Correct would be 2 (not 5). So the record count should be not simple all
records, but those records (based on the field Workplacename) with a unique
entry.
As I see it now, There are 3 records with "WS4483" and 2 records with
"WS4497". What I need/want is a total count (in the header) of the
workplaces. This means that "WS4483" should only be counted 1 time (and the
same for "WS4497"). That would result in a total of 2, which is the correct
amount of workplaces.
Any help appreciated how to accomplish this.
I have tried to use a ab|-field in the groupheader section to count the
"workplaces". And it started nicely at 1, then 2, 3, 4, etc. etc. The last
one also was correct. Thought to use that field (well the last one) as
basis and in the reportheader make a field which "reads" the content of the
previous mentioned. That would result in the correct amount of workplaces.
But that didn't work.
the header of the report.
The report is build from two tables. The first table has a column which has
the name/code of the workplace (like WS4483). The second table is a
hardware list. Each device which is used on a specific workplace also has
that workplace name/code. In this second table that column has duplicate
entries (because a computer, monitor, printer all can have the same
workplace, so WS4483 can be used more than once). Each device has a
company-label with a code which is the HWCode.
The report looks like this....
Workplacename Username HWCode HWDescription
---------------------------------------------------
WS4483 John Doe
L-899 Compaq Deskpro EP
L-632 Eizo FlexScan F520
L-463 HP DesignJet 980
WS4497 Peter Pan
L-492 Compaq Deskpro EXD
L-211 Eizo FlexScan F520
If I use =count(*) all records are counted, which results in a total amount
of 5. But if I use =count([Workplacenaam]) this will also result in a total
of 5.
Workplacename and Username is from one table. HWCode and HWDescription
comes from a second table, which also has the field Workplacename, because
that is the field which links/connects those two tables.
As in the above example I want to know how many workplaces there are.
Correct would be 2 (not 5). So the record count should be not simple all
records, but those records (based on the field Workplacename) with a unique
entry.
As I see it now, There are 3 records with "WS4483" and 2 records with
"WS4497". What I need/want is a total count (in the header) of the
workplaces. This means that "WS4483" should only be counted 1 time (and the
same for "WS4497"). That would result in a total of 2, which is the correct
amount of workplaces.
Any help appreciated how to accomplish this.
I have tried to use a ab|-field in the groupheader section to count the
"workplaces". And it started nicely at 1, then 2, 3, 4, etc. etc. The last
one also was correct. Thought to use that field (well the last one) as
basis and in the reportheader make a field which "reads" the content of the
previous mentioned. That would result in the correct amount of workplaces.
But that didn't work.