Hi Ravi,
Below is the sample data in my table.
Input parameter for my report is ERDAT. For Ex - ERDAT (01.11.2015 - 30.11.2015) the expected result should be
QMATRT KF1 KF2
WB 9 6
KF1 - Total no rows for Nov-15
KF2 - If date in QMDAB is available and falls under user input date values(i.e 01.11.15 - 30.11.15) take the count. If QMDAB is blank, check for AEDAT if it falls under (01.11.15 - 30.11.15) take the count. If data is present in QMDAB no need to check AEDAT
In the above example QMNUM - 00200000278, 290, 294 is omitted since it doesn't satisfy our condition(QMDAB & AEDAT is blank).
QMNUM - 00200000279, 280, 288, 292, 293 is counted because its corresponding QMDAB has values and its falls under user input value(01.11.15 - 30.11.15)
For QMNUM - 00200000291, QMDAB is blank so we hav to check AEDAT. AEDAT value falls under user input range so take the count.
Thanks
Vijay