Oma,
        Your suggestion described below works fine for the conditions as they are
presently defined, gives me exactly what I want, and I don't anticipate any
problems should the number of TYPEID increase.  Thanks for your help.

Jim

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Oma Cox
> Sent: Thursday, June 07, 2001 10:59 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Report Totals
>
> Jim,
>........... If the number of TypeID are fixed then you could do something
like this in
> your code!
>
> CREATE TEMPORARY table Ttypetotals (typeid text ??,typetotal currency)
>
> INSERT INTO Ttypetotals (typeid,typetotal) +
> select typeid,sum(prjqty*trarate) +
> from datatable group by typeid +
> where prjdate between .vbdate and .vedate +
> order by typeid
>
> select typetotal into vtypeA indic itypeA from Ttypetotals where typeid =
> 'A'
> .
> .
> select typetotal into vtypeZ indic itypeZ from Tytpetotals where typeid =
> 'Z'
>
> This will give you the totals for all the typeid's in a var
> between the date
> range you selected
>
> Then in your report footer define the range of vars for vtypeA to
> vtypeZ to
> display this data.
>
> Best regards,
>
> Oma
>

Reply via email to