That gets me close to where I need to be. The problem is that the zones are customizable and the classes are customizable. I'm trying to get a report that has the zones down one side and the classes across the top with all the counts filled in.
If I can get it into the right shape for the cross tab program then I'm home free. (I made a program that will programatically do a report from a cross tab table)
You've got me close... I just need to get all of the classes listed for each zone and I think I've got it.
The good thing is that once I get an SQL statement that gets the data ready for the cross tab program, I can go from one table to a unknown by unknown report. That'll be useful for a lot of reports.
Thanks for all your help,
-Michelle
>Select Zone,Class,count(*) as counter From Table1 ;
>Into Cursor tmp nofilter ;
>Group by Zone,Class
>
>Select zones.Zone,tmp.Class,tmp.counter From zones,tmp ;
>Where zones.zone=tmp.zone ;
>Union All Select zone,"" as class, 0 as counter From zones ;
>Where zones.zone Not In (Select zone from tmp)
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement