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

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

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

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :Sql Server
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  

View Complete Post

More Related Resource Links

Automatically convert portrait format to landscape

Good morning, I am looking for a code to automatically print a report in landscape format if it does not fit into a portrait, something like 'If the wide of the report is larger than the longer, print landscape, else print portrait' It seems easy but I do not find anything to do so, thank you for your response Claude from Québec    

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

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

Trouble importing strange column format report from Excel 2007 to SQL 08

Hi, I'm not sure whether this belongs in this section or the SSIS one so hopefully I've got it right!  Hoping someone will be able to help with a problem I'm having importing a report with header and detail rows from our antiquated POS system into SQL 2008 tables.  The reports export in Excel 2007 format and for each header row there can be one or more detail rows starting from column B.  As such I've tried several things such as openrowset, an Access 12.0 OLE DB source in SSIS and even COM automation of Excel to try and write a conditional split which will hold the header details in variables then write them to rows alongside the detail rows.  I've pasted a small sample of the data here as I wasn't able to attach it: 01/07/2010 @ 11:18 Page: 1 RECEIVING: Voucher Journal Sort: VC|Str|Vou Date|Vou #|Document SID Filter: Voucher Date: 01/06/2010@12:00a..30/06/2010@11:59p Include Item detail: DCS|Item#|Desc1|Attr|Material|Size|Qty VC Str Vou Date Vou # Qty ABC 001 15/06/2010 12345 38 E NN 66 200148 XXXXXXXX RED SHAD E NN 66 200149 YYYYYYYYY BLACK GO E PP 60 200154 ZZZZZZZZZ BLACK CDE 002 16/06/2010 13839 8 F SA 35 217500 XXXXXXXX Natural F SA FL 218674 YYYYYYYYY Chalk F SA WE 221462 ZZZZZZZZZ White FGH 001 21/06/2010 13905 3 F SH 85 126260 XXXXXXXX Navy IJK 001 23/06/2010 13914 3 E AA 61 250005 YYYYYY

Displaying Image stored in rtf format in access database displaying it on crystal report

Hello, I'm working on a C# project combined with "Crystal Reports 10". When a user inserts something in a "TextField" in my C#-Program, it's saved  as RTF-code (Bolt,Pictures,Underlined,....) to a database.. So if they  reopen it in my "C#"-program they're able to see what they've entered  including their pictures .... But when I created a "Crystal Report"-file and combined it with the same  database used in my "C#"-program, it only show the formatted text and not  the pictures or images... Is there a way to show the "Picture" or "Image" they've inserted in RTF-code  ??? When I copy the code from the database in a simple Text-File and rename  it too "Test.rtf", it wil open correctly in word (with picture and  everything else)... So I hope there is a way to get the picture, Cz it's rather important  they've got a picture of the product they wanna print ...

Report Format RDL Version Control

Hi, I've been using file name with date plus the time stamp as my version control. As my library grow it's getting out of control and there are chances that I mistakenly saved the file over the previous version. What is the best practice and tool for RDL report format version control?

Determine the Current Report Rendering Format


I have several reports in SSRS 2005 (SharePoint Integrated Mode) that have Jump to URL navigation links.  The links were working intermittently, and the fix I implemented was to use a Javascript window.open command for the links, and it worked.  However, now the links do not work when the reports are exported to Excel because it doesn't support Javascript.  I'm trying to satisfy the users' requirements of having the links work regardless of how the report is rendered.  Is there a way that I can use custom code to determine the current URL (with query string parameters) so that I can parse it to determine whether the report is currently being rendered as HTML, Excel, PDF, etc.?  If not through parsing the URL, is there another way to go about this that I'm missing?

Thanks in advance,


Blank page while exporting the SSRS report to PDF format

While exporting SSRS report to PDF, I am getting blank page in between and at the end also. The report page size is set to 8.75in x 15.00in with 0.02in margin from left, right, bottom and top. I tried in changing the tablix and rectangle box "KeepTogether" property also. In both the case (true/false), I am getting blank pages. Can anyone help me out?

Date picker format -> Preview vs Report


I'm at my wits end!

When previewing a report on one of our machines, the date format for a parameter insists that en-GB dates are invalid (dd-mm-yyyy-). Instead, it requires en-US (mm-dd-yyyy). When deploying the report, it goes back to the correct format of en-GB.

Bear in mind, this works on all of the rest of our development machines exactly as required. Only this one machine doesn't work.

I've tried: -

  • Setting the report properties to United Kingdom - it already was
  • Changing ReportViewer.aspx to include --> <%@ Page Language="C#" AutoEventWireup="true" Inherits="Microsoft.ReportingServices.WebServer.ReportViewerPage" Culture="en-GB" %>
  • Ensuring that regional settings (control panel->regional and language options) is setup to English -United Kingdom. It all already was (regional, location, language and advanced tabs all setup to UK)
  • Ensuring the browser on the machine is setup to English -United Kingdom, it already was
  • Adding <globalization culture="en-GB" uiCulture="en-GB" /> to web.config
  • Updating BIOS (not my idea, but was getting to the point where I'd try anything! Basically, the BIOS has the date in the US format, so despite my reasoning that it's irrelevant due to regional settings, we upda

Generate report in Excel format with formulas



I have a report with simple calculations (adds some fields). The report is requested in excel format via Reporting Services WebService.

I would like to have the generated excel file to have the formulas, not just the results. I tried to put the formula text in report definition, but it does't work, it appears in excel as text, not as formula.

How can I do this?



Reporting Services Error-The version of the report server database is either in a format that is not


 Hi,I have Configured All Reporting SErvices Through Rep Serv Configuration Wizard


When I type 


on top of Address Bar Of Browser I Am Gettin This Error

  • The version of the report server database is either in a format that is not valid, or it cannot be read. The found version is 'Unknown'. The expected version is 'C.0.8.40'. To continue, update the version of the report server database and verify access rights. (rsInvalidReportServerDatabase)
PLease Help Me


html format print of invoice



iam working in a project  asp.net, my client wants to print invoice in html format. how to bind

my data in html format,

pls send some links to work around.

portrait and landscape orientation in the same report

I'd like to know how can I have different text orientations in the same report, using the list item - one page with a portrait and another page with a landscape text orientation. Both pages will contain detailed tables.  How to rotate a table by 90 degrees or are there any other solutions? Thanks!

Infopath 2010 print in MS word format

I have a form library IP 2010 - I want to have the option for the user to print the IP document in a pre set formatted MS Word document - Is this possible via action from the Infopath form.  Thank you 

How To disable Export Format in Dropdown List of report viewer web part?



does any one knows how to disable the export option in the dropdown list of report viewer web part?


How do I format dates in a report



I am creating a Report Server Project in BIDS (SQL Server 2008). How do I format dates in this way (October 2010) in the number format field in properties page? Is there a different way of formatting dates?



report builder 3.0, how to show a int type field(like id) in matrix format report


it always asking for the aggregate or sum, count ... I just want to show plain value like

1 myval1 myval2 myval3

2 myval2 myval2 myval2

not lile

(blank) myval1 myval2 myval3

(blank) myval2 myval2 myval2

2       (blank) (blank) (blank)

How To Set a Date Format In GridView Using ASP.NET 2.0

A very common desire is to set a column of a gridview to display just the month, day and year of a DateTime type. The problem is the by default, the HtmlEncode property of the boundfield attribute (
The problem is that if this field is enabled, you can not pass format information to the boundfield control. That is, if you try the following code, you will not get the desired result.
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