report recordsource from crosstab which columns varies

S

Song

I want to use crosstab as recordsource of report. For field Typ, there are 3
posibilities: Continue, New, Transfer

For some semester, there are only Continue and no New and Transfer record so
my report crash. How to display Continue, New, Transfer column heading
regardless of having record or not?

TRANSFORM Count(tblMaster.SID) AS SIDOfCount
SELECT tblCountry.Country, Count(tblMaster.SID) AS Total
FROM tblEnrolled INNER JOIN (tblCountry RIGHT JOIN tblMaster ON
tblCountry.CountryID = tblMaster.CountryID) ON tblEnrolled.SID =
tblMaster.SID
WHERE (((tblMaster.Active)=Yes) AND ((tblEnrolled.Sem)="3"))
GROUP BY tblCountry.Country, tblMaster.Active
PIVOT tblMaster.Typ;
 
K

KARL DEWEY

Change pivot line to this --
PIVOT tblMaster.Typ IN("Continue", "New", "Transfer");
 

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

Top