[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

SSRS Create Blank Numbered Grid

Posted on 2014-03-31
3
Medium Priority
?
605 Views
Last Modified: 2014-04-01
I am try to create a form that will be printed from an SSRS Report. I would like to create a subreport to embed in the main report.

This subreport should print some column headings then a blank numbered grid:

Something like this:

    Col 1   |   Col 2  |   Col   3 |   Col 4
--------------------------------------------------
#1           |             |               |
#2           |             |               |
#3           |             |               |

Open in new window


I would like to send the subreport the number of rows to create - as a parameter.

Thank you in advance for your help!
0
Comment
Question by:wfwalshiii
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 22

Accepted Solution

by:
Nico Bontenbal earned 2000 total points
ID: 39968960
You could try with this SQL statement as the data source for the Grid:
;With Rows(Id) as
	(
		select 1 
		union all
		select id + 1 from rows where id < 42)
	select * from Rows
	OPTION (MAXRECURSION 42);

Open in new window

See http://technet.microsoft.com/en-us/library/ms186243(v=sql.105).aspx for more information about this technique. You can replace 42 with @GridRows (for example) to make it a parameter.
0
 

Author Comment

by:wfwalshiii
ID: 39970219
That works for what I asked. Thank you.

If I wanted to do this with the same idea, can I force SSRS to jump to next record mid-row?

    Col 1   |   Col 2  |   Col   3 |   Col 4
--------------------------------------------------
#1           |             | #2            |
#3           |             | #4            |
#5           |             | #6            |

Open in new window

0
 
LVL 22

Expert Comment

by:Nico Bontenbal
ID: 39970333
You could add a column grouping to your matrix and create a formula that returns true for even numbers and false for odd numbers, then group on that formula.
Another option is to change your code to:
;With Rows(Id) as
	(
		select 1 
		union all
		select id + 2 from rows where id < 42-1)
	select * from Rows
	OPTION (MAXRECURSION 42);

Open in new window

This will return the numbers for Col1 for you. On Col 3 you just add 1 to that number.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, In my previous Article  (http://www.experts-exchange.com/Database/Reporting/A_15199-Introduction-to-Microstrategy.html)I discussed some basic understanding of Microstrategy that how we can get in Intro of Microstrategy (MSTR). Now it's tim…
In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question