.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

Printing Landscape Report using the Print Control of the ASP.NET Report Viewer

Posted By:      Posted Date: September 02, 2010    Points: 0   Category :Sql Server
I am using the ASP.NET Report Viewer 2010 web control in remote processing mode connected to a SQL Server Reporting Services 2008 R2 report server in Native Mode. I am viewing the report in IE8 and the print control within the report viewer is available. According to "Printing Reports from a Browser Using the Print Control" at http://msdn.microsoft.com/en-us/library/ms159237.aspx  "The Print dialog box and the default printer settings for width, height, and page orientation are determined by the report definition." In SQL Server Business Intelligence Development Studio I am using the “Report Properties” window accessed from the “Report” menu to set the Orientation to “Landscape”, the paper size to “Letter”, the Width to “11in”, and the Height to “8.5in” in the report definition. When viewing the report using the ASP.NET Report Viewer 2010 in IE8 and exportint to PDF, the report renders correctly in landscape orientation and the size both on screen and printed is as defined in the report definition. However, if I print it directly from the ASP.NET Report Viewer using the Print Control the print preview shows the report correctly in landscape orientation and page size, but the resulting printout is in portrait orientation and skewed or cropped.  If I go into the properti

View Complete Post

More Related Resource Links

Report Viewer control: Print crashes if subreport is too long



I have a report and a .NET 3.5 Winforms application which displays the report in local mode, passing the required datasets to the report as it is supposed to do. It takes about 2 seconds before the report is displayed.

However, when I click on Print Layout, the "Loading..." box appears and does not disappear any more. If I want to print the report, a window appears telling me that the first page is being sent to the printer and... that's it, all I can do is kill my application via task manager.

After playing around with various elements in my report, I was able to reproduce this behaviour if one of my subreport returns too many rows (the subreport contains only a list element, listing all records).

I believe it has something to do with the subreport spanning more than one page. I played with the KeepTogether property on various elements, but to no avail. Has anybody experienced something like this before? Is there a workaround?



How I disable vertical scroll bar of report viewer control on Web Form.


I'm displaying .rdlc report file using Report viewer control on Webform. If  I Fix height of viewer control and data is not same as to size of viewer control then it display one scrollbar on viewer control and second vertical scroll bar is coming on webpage.

 I want to off viewer vertical scrollbar or in simple word's I don't want to display two scroll bar with my report. Please guide me or send me reference if any.


Microsoft Report Viewer control to display data on one page


Hello everyone,

I am wondering if the Microsoft Report Viewer control allows for display changes.  Say for instance a user wants would like to see all the data requested then another time would like to toggle thru the pages of infomation.  So does anyone know if the control allows for display changes from complete view to paginated viewing.  I am using MS VS 2008 with ASP.NET 3.0.  Thanks for your response.


Report Viewer Control Error

Hi All, I am adding a report datasource dynamically to report view web server control and getting the following eroor when i open the page. The DataSourceID of the ReportDataSource 'DataSet1_employees' of the ReportViewer 'ReportViewer1' must be the ID of a control of type IDataSource. A control with ID 'DataSet1_employees' could not be found.     Please help me where i am going wrong. The code is given below: protected void Page_Load(object sender, EventArgs e)    {        ReportViewer1.ProcessingMode = ProcessingMode.Local;        ReportViewer1.LocalReport.ReportPath = "Report2.rdlc";         ReportDataSource rdS = new ReportDataSource("Employees", GetData());        rdS.DataSourceId = "DataSet1_employees";        //this..Add(rdS);                ReportViewer1.LocalReport.DataSources.Add(rdS);        ReportViewer1.LocalReport.DataSources["Employees"].DataSourceId = "DataSet1_employees";        ReportViewer1.LocalReport.DataSources["Employees"]

Automatically print in a landscape format when report does not fit into a portrait format

Good morning,When I print a report, sometimes this report fits into a portrait format, sometimes, it does not, depending of the size of certain field that can grow, do someone know a way to automatically print into a landscape format if it does not fit into a portrait format?, I join the code of this report, when I print it, I have pages thats contain only a few caracters... I do not find how to attach a file here because if I could, I have printed this report in PDF so you will be able to see my problem.Thanks The code seems to be too long to fit in here, I can email to anyone that need to know more  

Report Viewer Control and Passing Paramaters

Hi Guys, I have a situation where I am created a WEB APP that has a submit button on a FORM on the first ASPX page.  I have some VB code behind that to generate Header and Lines records in two tables with a HEADER ID as my PK.  I have another ASPX page which has the Report Viewer control on it and prompts me for the HEADER ID and displays the report correctly when I manually enter the HEADER ID.What I am now trying to achieve is when the user clicks the submit button on the FORM I want it to redirect to the other ASPX page and pass through the Header ID as a Parameter and automatically display the REPORT. Can somebody please point me in the right direction to achieve this.ThanksJoel 

Dynamic Columns Using Report Viewer Control

Hi,, I'm using Report viewer Control to generate reports.Currently i have static columns..I need to have columns created  based on the DB Query  results i.e., DB query will return more columns under certain conditions and less columns in another...In Short,Headers and column data will be known only at runtime.how can i bind the data dynamically...what can i do to accomplish this..

Graphs stop displaying in Report Viewer Control after upgrade to SSRS 2008 R2

We are seeing an issue where certain graphs and guages are not being displayed within a report rendered in the report viewer control after we upgraded from SSRS 2008 to SSRS 2008R2.  You can see the graphs and guages render and then disappear from the screen when two other graphs are rendered.  When I export the report to Excel or PDF then all of the graphs and guages are rendered properly. There are a total of 3 graphs and 2 guages on the report - when it completes the rendering process, you can only see two of the graphs displayed in the report viewer control - as I said before, you can see all 3 graphs and 2 guages when exporting to Excel or PDF.  Using Internet Explorer v8.  This problem manifest itself right after the upgrade. Has anyone seen a similar issue? 

How to hide 'Print' button in report viewer??


Hi, i want to hide print button in report viewer by using javascript or with some CSS trick.

By default print button is visible. I don't want to hide by using 'ShowPrintButton' property.

Thanks in advnace.


Action to sub report in Report Viewer control


We are having SSRS 2008 and we are using report viewer control  V9.0.0.0  to preview the reports. Actions attached to images are not working. I am not getting “hover” /”hand”  icon when I move my mouse onto the images. These links are working fine when I open the report in browser. Any help on this.


Do I need to download the latest report viewer control. Where can I get that ?

Report viewer control is is displaying parameter item 'select a value' even when the default param



I am using SSRS 2008 R2,

I have set the default parameter of dropdown and in the output "select a value" item text is removed ,also in the Report Manager 'select a value' removed .

But when I am displaying the same reports in the ReportViewer control as ReportViewer1.ServerReport  in the the vs 2010 asp.net project the item select a value is reappearing in the output.

Could you please help me remove the default item text 'select a value' from the ReportViewer control aswel.


Printing and Print Preview hangs on a large report


Using SQL Server 2008 R2 Cumlative Update #4 (build 10.50.1746)

A report that is 119 pages long hangs after page 113 in both the print preview and printing.

A different report that is 90 pages long hangs on page 60 in both the print preview and printing.

These reports worked fine before applying the cumulative update #4.

Print functionality one Report viewer controller



  I'm currently using report viewer controller 8.0 in my WSS 3.0 site. But i don't have the print button. I tried by property ShowPrintButton property. But it didn't work. Can you please help me to active the print button on report viewer.

Report Viewer Control



We are using ReportViewer control avialble in vs2008 to get CRM dynamic reports from SSRS.We have a page where we have a serach control and four ReportViewer Control which will display Reports.

Each of these Reports have dropdown and button generated by the Report(rdl) file.On clicking of the button inside the Report,the whole page is getting refreshed (postback is happening).We need to avoid this .Kindlu suggest any solution for the same

The solution we tried was to put the Reportviewer control in the Updatepanel.This is not working as the Reportviewer control will not work in update panel

Kindly let us know any workarounds,other solution ,ideas






Cannot print report Unable to load print control


I am using report viewer in VS2010

Whenever I try to print the report I get following error:

Unable to load print control

Along with the I cannot see Print Command in other browser like Mozilla, chrome etc

Plz Help !!!

How to use report viewer 2010 in VS 2008


I downloaded report viewer 2010 from here


Now I want to actually use it in a website.  How do I do that?  Do I have to modify some part of web.config?  Specifically, what do I need to change?


populate report viewer by code


Hi all

I have a button "Show Report" to show some data from table

what I should write under this button to populate the reports ?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend