Get a Column on a report with no volumes on the base table

B

Box666

I have a crosstab query on which I have based a report. This to be run
weekly to show sales per week with columns (previously products from a
field) such as apples, pears, nuts, etc.
Last thursday when I originated the query there had been sales of all
products. Running it again today when no apples have yet been sold and
the report will not run as it cannot find the field "apples"
Is there a way I can "force" the field through, the only option I can
think of is to have a dummy table with all the products but set with a
0 volume and then append the weekly table to it, so even if there have
been no sales a column will still appear in the report.
 
K

KARL DEWEY

In the last line of the query insert an "IN" function that list you columns
in the order you want them displayed like this --
PIVOT XXX.YYY IN("Apple", "Pear", "Peach", "Plum");
 
Top