Cross tab in a report

J

Jeff

Hi

I'm running a crosstab query to come up with a list of clients by
neighborhood for a report. The query works fine, but now I want to
write a report using this.

Unfortunately, the boss decided the format of the report and wants the
neighborhoods listed down the page on left, instead of in a chart.

Like this:

Neighborhood 1 = NNN

Neighborhood 2 = NNNN

etc.

Is there an easy way to use the column headings on the crosstab query
to designate where to put the values for each neighborhood?

Thanks

Jeff
 
D

Duane Hookom

This doesn't come out very clear to me. You might want to show us your SQL
view of the crosstab and describe your requirements better.
 
J

Jeff

TRANSFORM CLng(Nz(Count(Demographics.DemogID),0)) AS CountOfDemogID
SELECT Count(Demographics.DemogID) AS [Total Of DemogID]
FROM Demographics
WHERE (((Demographics.[Program Type])="HMG"))
GROUP BY Demographics.[Program Type]
PIVOT Demographics.[Home Visitor];


Then the home visitors are listed as down the page as:

Home visitor 1 = the count
Home visitor 2 = the count

etc
 
D

Duane Hookom

Can't you just "turn off" the crosstab so you have a simple totals query?

SELECT Demographics.[Home Visitor],Count(Demographics.DemogID) AS [Total Of
DemogID]
FROM Demographics
WHERE (((Demographics.[Program Type])="HMG"))
GROUP BY Demographics.[Home Visitor];
 

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