I have created a crosstab which feeds into other queries as it has been designed so that the row headings match the key of another table and the columns can be used as fields in another query.
The problem I have is, in order to use it most easily I need the same three columns to show, even when there is no data for them. There are only ever a few records which the query returns, and sometimes none, this creates a problem because when there is no data in the query, the columns disappear making a mess of any queries that are looking for those columns.
The only way around this I've found is to create null records with '0' in the value fields to force the columns to appear, but this isn't ideal as now my database is full of null records and I need to make sure all other queries aren't returning the nulls. It would be easiest for me if there were simply a way to force the crosstab to always show certain values as columns.
The problem I have is, in order to use it most easily I need the same three columns to show, even when there is no data for them. There are only ever a few records which the query returns, and sometimes none, this creates a problem because when there is no data in the query, the columns disappear making a mess of any queries that are looking for those columns.
The only way around this I've found is to create null records with '0' in the value fields to force the columns to appear, but this isn't ideal as now my database is full of null records and I need to make sure all other queries aren't returning the nulls. It would be easiest for me if there were simply a way to force the crosstab to always show certain values as columns.