SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Populate tablix from same dataset based on switch


Populate tablix from same dataset based on switch

Author
Message
PSB
PSB
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2389 Visits: 1565
CREATE TABLE #Enabled
(
State VARCHAR(15),
DaysToEnable VARCHAR(10),
NumberOfDeliveries INT,
NumberofAccountNumbers INT

)
INSERT INTO #Enabled (State,DaysToEnable,NumberOfDeliveries,NumberofAccountNumbers)
SELECT 'Enabled',NULL,410,157
UNION
SELECT 'Enabled','0-4',298,99
UNION

SELECT 'Enabled','10-14',35,21
UNION

SELECT 'Enabled','15-19',6,5
UNION

SELECT 'Enabled','20+',0,0
UNION

SELECT 'Enabled','5-9',71,32
UNION

SELECT 'Non-Enabled',NULL,1260,358


SELECT * FROM #Enabled
DROP TABLE #Enabled

I have a detail report with a separate dataset and two summary report below the detail using the query in the above dataset

For the first summary report I need the following (where days to enable IS NOT NULL):

DaysToEnable NumOfDeliveries NumberOfAccountNumbers
0-4 298 99
10-14 35 21
15-19 6 5
20+ 0 0

Second Summary report (where days to enable IS NULL):

State NumOfDeliveries NumberOfAccountNumbers
Enabled 410 157
Non-Enabled 1260 358


How do I achive this using the same dataset in different tablix ?

Please help.

thanks!
TaylorMade
TaylorMade
Mr or Mrs. 500
Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)Mr or Mrs. 500 (584 reputation)

Group: General Forum Members
Points: 584 Visits: 212
Use a Filter on each tablix, one for not nulls, the other for nulls (of course you need to use isNothing function in SSRS).
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search