0

Is there an easy way to do a page of badges in an SSRS report? I am looking at 2 across and 3 down per page based on a list. I have built one so far of a single column using a list box but the problem is that it is not advancing to the next record and shows me the same record over and over until I get to the end of the count of total records in the dataset so I know I am doing something wrong. I am using Visual Studio 2017

  • Ok, found my problem with the list not showing the next record and I have taken care of that. Now I am stuck on the two columns for the badges. If I take my List and duplicate it to the right side of the page, it shows a badge but is a match to what is on the left. Is SSRS incapable of going to the next record on the same row so to speak? – Jayson Larner Aug 18 '21 at 16:10
  • Can you show what you have now and what your dataset looks like. This is almost certainly possible but hard to give an answer without more info. You can check out an old answer of mine that tackles a similar (but more complex) problem here https://stackoverflow.com/questions/67333797/ssrs-create-multi-chart-by-project-with-3-charts-per-row-and-infinite-rows-if/67335838#67335838 – Alan Schofield Aug 18 '21 at 16:11
  • Well, my report is simple - First Name, Full Name, Title and Company. This is laid out in a list box and formatted accordingly. I have a single list box on my page and it clones for each person going down leaving the right-hand side of the page blank. I need to get it from just going down to moving left to right and then going down. I just don't see the option for it or haven't found it yet. – Jayson Larner Aug 18 '21 at 17:57

1 Answers1

1

I use a matrix when I am making a grid with boxes that go across and down.

First I add a ROW_NUMBER to the query to have the order in which to show the records. I subtract 1 so the values start with 0.

SELECT *, ROW_NUMBER()OVER(ORDER BY EFF_DATE) - 1 ROW_NUM 
FROM BLAH_BLAH...

Then in SSRS, add 2 Calculated Fields to the dataset with the ROW_NUM.

The first is named ROW. It will have an integer with the row that the record will end up in.

=INT(Fields!ROW_NUM.Value / 2)

The second is COLUMN that will give the a column number.

=Fields!ROW_NUM.Value MOD 2  

Then in the matrix, set the grouping based on the calculated fields.

COLUMN GROUP Group and Sort by COLUMN

ROW GROUP Group and Sort by ROW

The 2 can be changed to use whatever number of columns is needed.

Hannover Fist
  • 10,393
  • 1
  • 18
  • 39