Crosstab Report Problem when data missing

Y

Ynot

I have a crosstab report that reports activity. The activity is by date on
the vertical axis and day of week on the horizontal axis.



My problem is that there is only occasional activity on Sunday. When there
is no activity on Sunday, I get an error when I run the report because there
are no entries for that column.



Is there any way to insure that all Horizontal columns are filled or
eliminated if there is no data?
 
G

George Nicholson

Open your crosstab query in design view. Right click up in the Table area
and select Properties (the dialog window should read Query Properties, not
Field Properties).

In Query Properties, set Column Headings to "Monday","Tuesday",..."Sunday"
This will force the query to always return those columns, *in that order*,
whether there is data for those values or not.

It will *only* return those columns, so be sure they are an *exact* match
for the data in your designated Column Heading field (i.e., use
"Mon","Tues"..."Sun" instead, if that's what your data returns).

Your query will now return a "Sunday" field, data or not, so your report
should display without errors.

HTH,
 

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