CREATE TABLE #Enabled( State VARCHAR(15), DaysToEnable VARCHAR(10), NumberOfDeliveries INT, NumberofAccountNumbers INT)INSERT INTO #Enabled (State,DaysToEnable,NumberOfDeliveries,NumberofAccountNumbers)SELECT 'Enabled',NULL,410,157UNIONSELECT 'Enabled','0-4',298,99UNIONSELECT 'Enabled','10-14',35,21UNIONSELECT 'Enabled','15-19',6,5UNIONSELECT 'Enabled','20+',0,0UNIONSELECT 'Enabled','5-9',71,32UNIONSELECT 'Non-Enabled',NULL,1260,358SELECT * FROM #EnabledDROP TABLE #EnabledI have a detail report with a separate dataset and two summary report below the detail using the query in the above datasetFor the first summary report I need the following (where days to enable IS NOT NULL):DaysToEnable NumOfDeliveries NumberOfAccountNumbers0-4 298 9910-14 35 2115-19 6 520+ 0 0Second Summary report (where days to enable IS NULL):State NumOfDeliveries NumberOfAccountNumbersEnabled 410 157Non-Enabled 1260 358How do I achive this using the same dataset in different tablix ?Please help.thanks!
↧