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

  • Thread starter Thread starter Box666
  • Start date Start date
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.
 
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");
 

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

Back
Top