J
joshblair
I am trying to build a report that will accomodate a crosstab that
returns an unknown number of columns.
I'm looking to write a query that wll tell me the maximun number of
columns that could be returned by this cross tab query.
I have the following crosstab query:
PARAMETERS [Please specify Part number] Text;
TRANSFORM
Avg(IIf([tblQUOTE_VALUES].vPrice<>0,[tblQUOTE_VALUES].vPrice)) AS [The
Value]
SELECT tblQUOTECORE.qtRFQDate, tblQUOTECORE.qtQuoteNo,
tblQUOTECORE.qtSupplierID, VEID.VEND_NAME
FROM (tblQUOTECORE LEFT JOIN tblQUOTE_VALUES ON tblQUOTECORE.qtQuoteNo
= tblQUOTE_VALUES.vQuoteNo) LEFT JOIN VEID ON tblQUOTECORE.qtSupplierID
= VEID.VENDOR_ID
WHERE (((tblQUOTECORE.qtPartNo)=[Please specify Part number]))
GROUP BY tblQUOTECORE.qtRFQDate, tblQUOTECORE.qtQuoteNo,
tblQUOTECORE.qtSupplierID, VEID.VEND_NAME
ORDER BY tblQUOTECORE.qtRFQDate DESC
PIVOT tblQUOTE_VALUES.vQty;
I tried to do a count of the [tblQUOTE_VALUES].vQty and
[tblQUOTE_VALUES].vQty fields but that doesn't seem to work.
So far, I have found one part number that produces 10 dynamic columns
from the crosstab query listed above.
The reason that I need to know how many possible columns is because of
all the "dynamic crosstab report" methods that I have seen, you have to
know the maximum number of columns that can be returned so you can put
unbound labels and textboxes to accomodate these columns.
returns an unknown number of columns.
I'm looking to write a query that wll tell me the maximun number of
columns that could be returned by this cross tab query.
I have the following crosstab query:
PARAMETERS [Please specify Part number] Text;
TRANSFORM
Avg(IIf([tblQUOTE_VALUES].vPrice<>0,[tblQUOTE_VALUES].vPrice)) AS [The
Value]
SELECT tblQUOTECORE.qtRFQDate, tblQUOTECORE.qtQuoteNo,
tblQUOTECORE.qtSupplierID, VEID.VEND_NAME
FROM (tblQUOTECORE LEFT JOIN tblQUOTE_VALUES ON tblQUOTECORE.qtQuoteNo
= tblQUOTE_VALUES.vQuoteNo) LEFT JOIN VEID ON tblQUOTECORE.qtSupplierID
= VEID.VENDOR_ID
WHERE (((tblQUOTECORE.qtPartNo)=[Please specify Part number]))
GROUP BY tblQUOTECORE.qtRFQDate, tblQUOTECORE.qtQuoteNo,
tblQUOTECORE.qtSupplierID, VEID.VEND_NAME
ORDER BY tblQUOTECORE.qtRFQDate DESC
PIVOT tblQUOTE_VALUES.vQty;
I tried to do a count of the [tblQUOTE_VALUES].vQty and
[tblQUOTE_VALUES].vQty fields but that doesn't seem to work.
So far, I have found one part number that produces 10 dynamic columns
from the crosstab query listed above.
The reason that I need to know how many possible columns is because of
all the "dynamic crosstab report" methods that I have seen, you have to
know the maximum number of columns that can be returned so you can put
unbound labels and textboxes to accomodate these columns.