I have made a portal with 24 statistic fields giving me the sales and the costs per month.
It works fine with a script making the search for each month and writing the results in the 24 fields like :
Jan TotSales1 TotCosts1
Fev TotSales2 TotCosts2
and so on
In the search field of my script I have written : 1/1/2004...31/1/2004 for the first one and 1/2/2004...28/2/2004 for the second and so on
Unfortunately this synthesis is only valid for 2004 and I will have to change the script for 2005 , 2006 and so on.
Does somebody know a way ( more simple than to duplicate the script 10/12 times for 10/12 years ) to allow the user just to change the year (in a Global field for instance) and get all the statistics for the requested year.