简体   繁体   中英

How to create seat arrangement SSRS report

I want to create unsold seat SSRS report. I have vertically align report like
当前布局

But I want following design 所需的布局

Data return from stored procedure is
SP回报

How to implement this design in SSRS

Assuming you cannot change your stored proc (if you can then you can do this work in there directly).

DECLARE @RowWidth int = 5
CREATE TABLE #t (GroupLabel CHAR(1), SeatLabel int)

INSERT INTO #t EXEC myStoredProc

SELECT 
        GroupLabel, SeatLabel
        , CEILING((SeatLabel -1) / @RowWidth)  AS SeatRow
        , (SeatLabel - 1) % @RowWidth as colGrp
    FROM #t

If your stored proc produced 20 results, A 1-10 and B-10 then the results would be as follows. 在此处输入图片说明

Add a mtrix control and then group by GroupLabel and SeatRow as row groups and then add a column group on colGrp.

The final report design looks something like this (the expression is simply GroupLabel and SeatLabel concatenated. ( =Fields!GroupLabel.Value & Fields!SeatLabel.Value )

在此处输入图片说明

And the final output looks like this

在此处输入图片说明

It's not 100% but with a bit of formatting it should be close enough.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM