-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Use a cross-tab query as the report's data source. Create the report
based on the query (IOW, create the query first).
Query:
TRANSFORM Sum(payment) As theValue;
SELECT sid, Sum(Payment) As Total
FROM table_name
GROUP BY sid
PIVOT Format([date], "mmm") IN ("Jan", "Feb", "Mar", "Apr", "May",
"Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec")
I used the IN () subclause so you'd always have the month names - just
in case there aren't any payments for one, or more, months.
--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv
iQA/AwUBQcE/VoechKqOuFEgEQIiYQCdHi6uyrIPJhaFsvF4S3E+9QSOTtcAoL E+
5aR1GOcKvpDNHmBq7y1x5QBq
=A2rU
-----END PGP SIGNATURE-----
spirytuspl@hotmail.com wrote:[color=blue]
> i got problem with creating reports and would appreciate if someone
> would point me out to some good tutorials on the topic, or simply
> explain where should i start and what should i do.. i'm quite in hurry
> and having checked the net i'm still stuck so you guys are my only hope
> ;) lets say i'm having on only one table with four columns:
>
> date sid payment agent
> 11/02/2003 1234 500 abc
> .. ... ... ..
>
> and so on..
>
> my report has to look sth. like that:
>
> sid january february march april ......
> 1234 800 300 700 1000
>
>
> so every person with "sid" i paying certain amount and those payments
> are stored in database, every one o them with unique date. on report i
> need to display sid number, and how much that particular person with
> sid had paid in each month (dosent matter what year). i'm sorry if
> explanation is not very clear but i did the best i could, if any more
> information will be necessary please let me know and i'll try to
> clarify my problem. thank you very much for any help as such would be
> MUCH appreciated :)
>[/color]