reporting services - SSRS Group on multiple colums, total and expand -
in ssrs, have dataset query(mssql db) returns 3 columns:
dataset1
timestamp customer product
and trying display table totals timestamp(date only) , product, , timestamp collapsed on date. see example 1.
date customer product total + 07/12/2016 max fork 5 + 07/12/2016 max spoon 4 + 07/10/2016 jim knife 11 + 06/02/2016 steve fork 6
allowing user expand date see rows exact timestamp, this...
date customer product total - 07/12/2016 max fork 5 07/12/2016 16:25:12 max fork 1 07/12/2016 13:11:02 max fork 1 07/12/2016 12:45:45 max fork 1 07/12/2016 10:33:20 max fork 1 07/12/2016 08:25:55 max fork 1 + 07/12/2016 max spoon 4 + 07/10/2016 jim knife 11 + 06/02/2016 steve fork 6
i pieces working here , there, not together. appreciated. i'm rather new creating tables scratch , complexity. thank you.
i'm starting sample dataset
date customer product 2016-07-15 02:14:15.777 max fork 2016-07-15 03:14:15.777 max fork 2016-07-15 04:14:15.777 max fork 2016-07-15 05:14:15.777 max fork 2016-07-15 06:14:15.777 max fork 2016-07-15 03:14:15.777 max spoon 2016-07-15 04:14:15.777 max spoon 2016-07-15 05:14:15.777 max spoon 2016-07-15 06:14:15.777 max spoon
here's how go it
start blank table on report, set dataset (mine dataset1).
now put in details row first. didn't indicate you're returning metrics db assume each record 1 (?). set table way:
which renders
next, want create parent group. table selected, right-click "details" row group , select add group > parent group...
in group box, put =1. change later. check add group header. click ok.
this have added new column on left don't want can delete column (but column, not group!).
it should end this:
back down in row groups area, double click new group open group properties. in group on section, change expression "=1" put in earlier this
=format(fields!date.value, "mm-dd-yyyy")
next, add customer , product additional grouping columns click ok.
now in table, set group's date column cell value same expression used group it:
=format(fields!date.value, "mm-dd-yyyy")
customer , product same, in total column, set expression to
=count(1)
here's preview far
all left collapse groups , make them can toggled.
click textbox want toggle , take note of text box's name. me textbox68.
double-click details row group again open properties. go visibility section. set "hide", , check "display can toggled report item:". select appropriate textbox (in case textbox68)
here preview
Comments
Post a Comment