Print an SSRS Report multiple times based on a value entered

I am currently working on SSRS reports 2008 displaying them in Website created in VS 2010 i.e., ASP.NET 4.0 C#. My current issue is I have a report with only a Letterhead on it. And this report page needs to be printed multiple times based on the value in number of pages TextBox as shown

To be a bit descriptive: When the user enters the value in Number of Pages TextBox and clicks on this Print button icon, he/she lands on the page with ReportViewer control Version 10 displaying the report.This report has only a letterhead in the PageHeader of the report and here this report will be printed by clicking the default print button of ReportViewer control. But, I am unable to figure out how to print this report page those many times as there will be the value in the No of Pages TextBox (as shown in the fig.) (The Letterhead of the company to be shown in report is retrieved from database through a Stored Procedure) I tried a lot of Googling but to no avail.

Answers


Create a new report. This report should have 1 parameter called "number of copies" (or equivalent). It should also have a Tablix with 1 column and no borders, inside the cell insert a sub report pointing to the report with the letterhead.

Your dataset query should be something like this:

WITH dataset AS (
   SELECT 1 AS ID UNION ALL 
   SELECT ID + 1 FROM dataset WHERE ID < @Param
)
SELECT ID 
FROM dataset --edit: obviously I was missing the table
OPTION (MAXRECURSION 0)

Then on your tablix, use this dataset, group by ID and on the group properties select "Page Breaks"->"Between each instance of a group".

If I understood your question correctly, this should do the trick.


Need Your Help

How to read if a checkbox is checked in PHP?

php html forms post checkbox

How to read if a checkbox is checked in PHP?

Release a Login Screen

login uiviewcontroller dismiss

I have just started getting into coding and have found Parse, which helps you code in a login screen and uses their web databases to store info. I have gotten the login to pop up and is working, but

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.