.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

Automatically convert portrait format to landscape

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

View Complete Post

More Related Resource Links

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  

How to convert Date format from dd/MM/yyyy to mm/dd/yyyy in asp.net



         I am using a text box which captures the date from the datepicker and displays in dd/MM/yyyy format in asp.net using C#

When i try to pass this text box value into the DatTime variable i am getting the error as

"String was not recognized as a valid DateTime. "


my code goes like this

DateTime dt;




i tried to use Conver.ToDateTime() function but the same error is croping up..


Can any one plz suggest me on this.....Thnks in advance

Want to convert html page into pdf format & send same pdf as a attachment

Dear All i want to convert html page into pdf format & i have to send that same pdf  by attachment,if some one has the sample code , please send me

How to convert seconds to HH:MM:ss format

Write a C# program that prompts the user to input the elapsed time for an event in seconds. The program then outputs the elapsed time in hours, minutes, and seconds. (for example, if the elapsed time is 9630 seconds, then the output is 2:40:30.)Can anyone pls help me!!Im using visual studio 2005

How to convert raster Image to Vector image format

I want to covert raster image to vector image format in  C#is it possible ??Thanks

how to convert the text to mp3 speech format

im working on a applicatio that will speak out a text file for you. i have code to read a text file but can not directly convert and save in mp3 format.. need help.. :)

Need to convert query string(date - 09/15/2010) to a text format - yyyymmdd

I am fairly new to C # and need some assistance with a form page.  I have created a simple form that requires the user to select a beginning date and ending date.  I then pass the values to my code behind page via query strings.  I have them passing, but I need the format to be change to a different format.  Unfortunately the database does not use the standard date format.  It requires the date to be in a text format as YYYYMMDD.Form: <tr> <td> Beginning Date:</td> <td><asp:TextBox runat="server" ID="begDate"></asp:TextBox> <asp:Image ID="Image2" ImageUrl="~/images/calendar_schedulehs.png" runat="server" /></td> </tr> Code Behind: protected void createReport_Click(object sender, EventArgs e) { StringBuilder url = new StringBuilder("Report/TopCustomer.aspx?"); url.Append("BegDate=" + begDate.Text); url.Append("&EndDate=" + endDate.Text); url.Append("&Brnch=" + ddlLocation.SelectedValue); Response.Redirect(url.ToString()); Current URL: TopCustomer.aspx?BegDate=09/15/2010&EndDate=09/30/2010&Brnch=300I need to have the above URL change to:TopCustomer.aspx?BegDate=20100915&E

convert date to mmddyy format before submit to database

Dear all,   Could anyone pls guide me on how to convert date in textbox which is in format(dd/mm/yy) to mmddyy before submit to database.    

Convert Remedy ARSystem Date in SQL Server to short date format

Hi: Does anyone know how to convert Remedy ARSystem Date in SQL Server to short date format compensating for EST and Daylight savings. Thank you in advance!

How to Convert Excel 2003 (.xls) format to Excel 2007 (.xlsx) programmatically in asp.net


Hi everybody

I am using a function to save dataset tables to excel files (some xml method http://www.codeproject.com/info/search.aspx?artkw=xls+to+xlsx&sbo=kw ) in xls format(excel 2003) but the excel file which is created taking 10 times more file size than conventional one.

And after that when I am converting to excel 2007 format I am getting the normal size for that file.

Now can anyone tell me how to convert excel 2003 file format to excel 2007 file format programmatically through asp.net

Thanks everyone in advance.


How to convert .html format data to normal text using Regular Expressions?

How to convert .html format data to normal text using Regular Expressions?

convert .eml email to .msg format in SharePoint



We have started using email enabled libraries in our SharePoint site and have realised that the messages are coming through in .eml. Since we use exchange and outlook 2007 the email that gets delivered into the library cannot be viewed in Outlook 2007 without tweaking the regsirty.

Is there a way that the emails that get delivered into the library can be .msg format?

Im not really even sure where to even start looking for the solution but it appears programming with an email event handler might be the place to start.

Any thoughts would be much appreciated

Convert TimeSpan to format DD:HH:MM:SS without the milliseconds

I have an application that needs to display duration time which is calculated with the TimeSpan class. The representation should be formatted as: D:HH:MM:SS (D=days, HH=hours, MM=minutes, SS=seconds).
When applying the ToString method of the object it yields out the exactly what we need (including negative values). Quote from MSDN: "A string that represents the value of this instance. The return value is of the form: [-][d.]hh:mm:ss[.ff] Items in square brackets ([ and ]) are optional, colons and periods (: and.) are literal characters; "

The issue is the optional decimal second fraction, we don't need it.

Please advice how can we eliminate this milliseconds optional representation.

Thanking you in advance


how to convert any format to pdf in asp.net



i want to convert any format of document to pdf document in asp.net

help me 

How to convert InfoPath form from sharepoint form library (xml format) to Excel format?


I've read about Document Converters in Sharepoint, and using xslt and xml mapping. 

What is the best way to convert InfoPath form with data in sharepoint form library (in xml format) to Excel format?

And how to do it?


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!

How to convert a column of "Apr 14 2004 12:00AM" nvarchar format to "14-Apr-2004" nvarchar format in


I have couple columns with "Apr 14 2004 12:00AM" nvarchar format in a table. I need to convert to "14-Apr-2004" nvarchar format. How can I do that? These are not in datetime format, and I have to get the 12:00am timing out of the column. There are many columns with many rows of data. Hope someone give me some idea, thanks!

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