Re: Working on a Subsummary Report

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/16/2011 9:04 AM, Dave wrote:
> Hi all,
> 
> I need to create a year to date report with individual  Subsummary
> Report (ala filemaker / others?) headings for each month. So, I’m
> curious the best way to approach this for performance speed and
> flexibility etc.
> 
> -  I can do 1 sql query for the whole year’s data - or 12 individual
> queries... probably best to do 1 big year sql query - but I’m not sure
> how to split things up with loops etc.
> 
> each summary month heading will need to show:
> - total month count of records
> - special counts within each month
> - more stuff
> - also the record data
> 
> like:
> 
> JAN - total record count = 50 special count = 3
> 
> data record 1
> data record 2
> data record 3
> 
> FEB - total record count = 47 special count = 4
> 
> data record 1
> data record 2
> data record 3
> etc.
> 
> 
> Q: is it better to do 1 year find or 12 month queries - is 1 big find faster?
> 
> Q: with one year find - how do I setup 12 loops to simulate summaries?
> do i just loop through the full set and only display if record is in
> month 1 or 2 or whatever?
> 
> If there are any links describing this process - that would be great
> 
> any help would be appreciated...
> 
> 

1) What does your db schema look like?
2) What SQL do you currently use?
3) What criteria do you want to use to sort the data?
4) Will the output be plaintext, html, etc?
5) Is this going to be used to import into another app, or display & printing?

-- 
Jim Lucas

http://www.cmsws.com/
http://www.cmsws.com/examples/
http://www.bendsource.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux