CrossTab report Access 2003

M

M Skabialka

I need to create a crosstab report of widgets applied to a vehicle. The
user will select vehicle locations, then the report should list the vehicles
on the left and column headers will list the widget names. The data is how
many widgets were applied.
The crosstab query looks great, but I am having trouble figuring our how to
create the column headers for the widget names. There are hundreds of
widget possibilities, but usually only 8 or 10 per vehicle, so I can't
create a report with all of those widget names in for just case they show up
on the report.
How can I extract the widget names for the column headers on the report?

For testing I tried doing this in Access 2007. I created the report with
the query open as a datasheet on a subform, so it was based on that. It
created the perfect report but the headers were static - when I save the
report those widget names were permanent, so when I change the query
parameters it doesn't work because of different widget names.
 
M

M Skabialka

I fugured out how to get the column headers and control source using code:
me.label0.caption=rst.field(i).Name
and
me.field0.controlsource = rst.field(i).Name
found at this site
http://www.blueclaw-db.com/report_dynamic_crosstab_field.htm

But I am having a problem doing summaries for each grouped section of the
report (location), and report totals.
If there are 7 widgets so I want 7 totals per group on my report so I can
get an average.
But when I use =sum(field0) I get error messages about not being able to
find the field name. Same with =sum(field0.controlsource)
Mich
 

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