reporting services - Creating groups in SQL as placeholders -


i have dataset display in ssrs report. data:

board   ticketgroup tickettype  ticketcnt support closed      closed      79 support closed      fcr         13 support open        open        12 support submitted   submitted   91 

i want display data in bar chart this: enter image description here

i not sure if can use current query , configure ssrs report display groups this. if can create query there groups returned this:

board   ticketgroup tickettype  ticketcnt     support closed      closed      79     support closed      fcr         13     support closed      open        0     support closed      submitted   0     support open        open        12     support open        closed      0     support open        fcr         0     support open        submitted   0     support submitted   submitted   91     support submitted   open        0     support submitted   closed      0     support submitted   fcr         0 

with data can create chart not show 0 values.

you'll need bunch of cross joins produce combinations of board, ticket group , ticket type , left join table:

select b.board,     g.ticketgroup,     t.tickettype,     coalesce(t2.ticketcnt, 0) ticketcnt (     select distinct board     your_table     ) b cross join (     select distinct ticketgroup     your_table     ) g cross join (     select distinct tickettype     your_table     ) t left join your_table t2 on b.board = t2.board     , g.ticketgroup = t2.ticketgroup     , t.tickettype = t2.tickettype; 

Comments