How to count records using count(*) in a chart report

F

FL

I tried to use the count(*) function in a text box in a chart report. I
have page header and footer and added report header and footer. I tried to
place the text box in each location with no luck. Nor will it work if I
place it in the detail section of chart report.

There are no fields showing when selecting grouping and sorting to create a
group header or footer. However, my chart does plot data from two fields.
One is a date field and the other is a number field that I'm trying to count
the number of records when report is run.

Any suggestions?
 
D

Daryl S

FL -

You should be able to put = count([datefield]) in the footer of the
report.

If it is not working, what does it show? Maybe you just forgot the equal
sign?
 
D

Duane Hookom

I expect you want to count something that is based on the same data as your
chart. Provide the Row Source SQL view and tell us what you want to count.

--
Duane Hookom
Microsoft Access MVP


FL said:
Duane,

Thanks for getting back to me. Your absolutely right the chart report I
created using the wizard does not have a record source. It's blank. I
don't know why. I'm trying to add a record source that returns a count, as
you suggest, but having difficulties in doing this so far. How do I create
a count function within a query or SQL? Can this be from the same query
the chart pulls data from?
--
FL


Duane Hookom said:
Looking at this question again, does your report even have a record source? I
expect it might not since the data is derived from the Row Source of the
chart control. You may need to add a record source that return just the count.
--
Duane Hookom
Microsoft Access MVP


FL said:
Hi Daryl,

I tried your suggestion on my date field and get #Error. I tried it in
both page footer and report footer sections. Same results.
--
FL


:

FL -

You should be able to put = count([datefield]) in the footer of the
report.

If it is not working, what does it show? Maybe you just forgot the equal
sign?
--
Daryl S


:

I tried to use the count(*) function in a text box in a chart report. I
have page header and footer and added report header and footer. I tried to
place the text box in each location with no luck. Nor will it work if I
place it in the detail section of chart report.

There are no fields showing when selecting grouping and sorting to create a
group header or footer. However, my chart does plot data from two fields.
One is a date field and the other is a number field that I'm trying to count
the number of records when report is run.

Any suggestions?
 
D

Daryl S

Thanks Duane - I learned something new today!
--
Daryl S


Duane Hookom said:
This will not work in the Page Footer. It will also not work if the name of
the control is the name of a field in the record source of the report.

--
Duane Hookom
Microsoft Access MVP


FL said:
Hi Daryl,

I tried your suggestion on my date field and get #Error. I tried it in
both page footer and report footer sections. Same results.
--
FL


Daryl S said:
FL -

You should be able to put = count([datefield]) in the footer of the
report.

If it is not working, what does it show? Maybe you just forgot the equal
sign?
--
Daryl S


:

I tried to use the count(*) function in a text box in a chart report. I
have page header and footer and added report header and footer. I tried to
place the text box in each location with no luck. Nor will it work if I
place it in the detail section of chart report.

There are no fields showing when selecting grouping and sorting to create a
group header or footer. However, my chart does plot data from two fields.
One is a date field and the other is a number field that I'm trying to count
the number of records when report is run.

Any suggestions?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top