1 2 3 4 5 6 7 8 9 10
| PARAMETERS [Quelle Année? YYYY] Long, [Quel mois? MM] Long;
TRANSFORM IIf(Sum((t1.Montant)+(t1.Rabais))<>0,Sum((t1.Montant)+(t1.Rabais)),0) AS v
SELECT t1.[No d'ajustement] AS Nbr, t1.[Description de l'ajustement] AS Description, First((select t1.[commentaires]
from [Fab003 Générale] as t1
where ([Année]=[Quelle Année? YYYY] and [Mois]=[Quel Mois? MM]))) AS Expr1
FROM [FAB003 Générale] AS t1
WHERE (((t1.Année)=[Quelle Année? YYYY])) OR (((t1.Année)=[Quelle Année? YYYY]-1) AND ((t1.Mois)=12)) OR (((t1.Mois)=[Quel Mois? MM]))
GROUP BY t1.[No d'ajustement], t1.[Description de l'ajustement]
ORDER BY t1.[No d'ajustement]
PIVOT IIf(t1.Année=[Quelle Année? YYYY]-1,"LastDec",Format(t1.Mois,"00")) In ("LastDec","01","02","03","04","05","06","07","08","09","10","11","12"); |
Partager