query doesn't return any fields

Goliano

New member
Local time
Yesterday, 21:51
Joined
Mar 8, 2007
Messages
6
I created a database that contains 2 tables. I then created a query that simply groups the data and calculates a row total. And it works as expected. However, when I try to create a report, using the query, I get, "The wizard was unable to generate fields from the record source you chose. Perhaps you chose a query that doesn't return any fields."

What am I doing wrong?

Screencaps attached.

Thanks.
 

Attachments

  • weekly - crosstab query.jpg
    weekly - crosstab query.jpg
    70.4 KB · Views: 158
  • weekly - autoreport error.jpg
    weekly - autoreport error.jpg
    13.2 KB · Views: 180
I think you cannot base a report of a Crosstab query.
 
Open the query before running the Report wizard
 
I think you cannot base a report of a Crosstab query.
Thanks. That helped with the summary reports. But now I need to figure out how to duplicate the results of that crosstab query with a select query. Any ideas?
 

Attachments

  • weekly - crosstab query.jpg
    weekly - crosstab query.jpg
    70.4 KB · Views: 131
Found a solution:

In a crosstab query you must enter all the valid column headings into the Column Headings property of the crosstab query.

http://allenbrowne.com/ser-67.html

Since my column headings are the numbers corresponding to the days of the week, it was no problem. The report is running perfectly.

Thanks again for your help.
 
Sorry mailman, but you can base a report on a crosstab query. I have several.

You are right, i didnt think it thru fully. But you cannot base a report of a TRUE crosstab meaning without fixed columns... This is a mayor headache also for having crosstabs in forms. You have to fix the columns which basicaly is not the point for a crosstab.
 
My reports are all based on crosstab queries without fixed columns. In my case, the user chooses a date range, and the columns represent each day of the range. You get around the non-fixed columns with a little code in the report that assigns control sources and label captions dynamically.
 

Users who are viewing this thread

Back
Top Bottom