SSRS - Is it possible to order report page column results horizontally rather than vertically?

Michael Nollette 26 Reputation points
2021-03-25T19:10:50.413+00:00

I've got a report created in report builder for a label printer with two columns of five labels each. My organization wants these reports ordered in reading order, like:

1, 2,
3, 4,
5, 6,
7, 8,
9, 10

But by default the columns always order vertically.

1, 6,
2, 7,
3, 8,
4, 9,
5, 10

Is there a way to change this?

SQL Server Reporting Services
SQL Server Reporting Services
A SQL Server technology that supports the creation, management, and delivery of both traditional, paper-oriented reports and interactive, web-based reports.
2,996 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Joyzhao-MSFT 15,601 Reputation points
    2021-03-26T03:24:01.473+00:00

    Hi @Michael Nollette ,
    For your needs, you could refer to the following link:
    https://stackoverflow.com/questions/10882784/ssrs-how-to-continue-data-to-next-column/10890383#10890383

    Usually I think it is more convenient to use TSQL statements than SSRS.

    declare @t table  
    (col1 int,col2 int)  
      
    insert into @t values  
    (1, 6),  
    (2, 7),  
    (3, 8),  
    (4, 9),  
    (5, 10)  
      
    select * from @t  
      
    ;with cte as (  
    select col1 rn from @t   
    union  
    select col2 rn from  @t)  
    select *   
    from cte a   
    left join cte b on a.rn = b.rn -1 and b.rn % 2 = 0  
       where a.rn % 2 =1  
    

    Output:
    81758-01.jpg
    Hope this helps.
    Best Regards,
    Joy


    If the answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.