This report is used for all quarters of year.
we need to calculate amounts for current Quarter as from beginning date of Quarter to current date and previous quarters as whole quarters.
Examples:
If i build report for February, current quarter is Q1. I need in my report to be displayed: Q1 as QTD( January, February)
If i build report for May, current quarter is Q2. I need in my report to be displayed: Q1 (January, February, March ) and Q2 QTD ( April May)
If i build report for July, current quarter is Q3.I need in my report to be displayed: Q1 (January, February, March ) and Q2 (April, May, June),and Q3 QTD ( July )
If i build report for October, current quarter is Q4.I need in my report to be displayed: Q1 (January, February, March ) and Q2 (April, May,June),Q3 (July, August, September)and Q4 QTD ( October)
If i build report for December, current quarter is Q4. i need Q1 (January, February, March ) and Q2 (April, May, June),Q3 (July, August, September)and Q4 QTD ( October, November, December)
So i need different logic for calculation each quarter depending on if it current one or not current one..
i have done qtd like in this article
blog.armaninollp.com/.../