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


Top 5 Contributors of the Month
Easy Web
Imran Ghani
Post New Web Links

CSS Page Ignored When Printing

Posted By:      Posted Date: September 08, 2010    Points: 0   Category :ASP.Net
 
This is the first time I have tried using a css page for printing and so far, I am having no success. It appears that the css page is being completely ignored.I am trying to print an asp.net control (datalist or panel - I have tried both). I can get the control to print just fine, but with no css formatting. If I use inline css in the control, it works, but I would rather use a style sheet for this.Any help here would be greatly appreciated.I have two style sheets:<link href="../styles/Styles.css" rel="stylesheet" type="text/css" media="screen" />    <link href="../styles/Print.css" rel="stylesheet" type="text/css" media="print" />I have a master page, a content page and a print page. The control is in the content page and is then printed from the print page:masterpage.mastercontentpage.aspxprint.aspxI have tried attaching the stylesheets in all of the pages (master, content and print) but still the print page ignores the css.What am I doing wrong here?Thanks in advance


View Complete Post


More Related Resource Links

Printing a page with all the formatting

  
Hi, I'm looking for an option to print a web page along with all the formatting of the page, like background color, images etc.. The regular javascript window.print() does print only the text in the page and the formatting is missing. Kindly suggest me a solution for this problem - either in javascript or C#. Any pointers regarding this would be very useful. Thanks in advance!!! --Vijay

Printing of Web Page is smaller with .NET pages

  

Hello!

I have been converting classic ASP web pages to the .NET platform and have found that the pages print out MUCH smaller with the .NET version.  Can this be a print property?  IIS setting?  As you can see I'm grasping here so could use a bit of educating about this as well.  This "shrinking" seems to happen in browsers other than IE as well (Chrome and Firefox).

ANY help or directions to helpful articles would be greatly appreciated!

Thanks,

 

Jeff Tolman

EandM Electric


SSRS Report printing blank first page

  

 

Greetings,

I have a pretty basic SSRS report that has a table header, body (with a table), and table footer.  When I view the report in normal layout,all is well.  However, when I switch to print layout only the table header and table footer are displayed on the first page.  I don't see any of my table data until page two.  So, this is adding an additional page to the beginning of the report and it's make a 17 page report 18 pages.  And because I am including the page numbers on the report, this is noticeable to the users of the report obviously.  Any feedback on things I could do or check to remove this blank page would be greatly appreciated. 

Thanks

jrock630


Crystal reports group wise printing in new page

  

Hi,

Greetings,

i have one problem in crystal reports.i made one group with accounthead.i want to print each account head in new page.please give me the best solution for this task.

Thanks in advance,

rj1980


Change Page orientation before printing

  

Hi Experts,

I want to implement print functionality, using the below code. How can include the PageSetup dialog box so that I can change the page orientation during run time?

PrintDialog myPrintDialog = new PrintDialog();

myPrintDialog.PageRangeSelection = PageRangeSelection.AllPages;


myPrintDialog.UserPageRangeEnabled = true;

Nullable<Boolean> print = myPrintDialog.ShowDialog();

if (print == true)

{

myPrintDialog.PrintVisual(MyChartGrid, StringTable.Chart);



Maverick

Font/letter spacing issue when printing from SSRS 2008 report page

  

We are developing reports in SSRS 2008.  When printing from the SSRS report page, we are seeing that that some text is "clumping" together or spaced oddly. I have tried a variety of printers so it's not printer-specific. If you export from the SSRS page to PDF or to Word and then print, everything prints as expected.

Nothing is as good as real text/names/data, but to reproduce, simply create several text boxes with...
ABCDEFGHIJKLMNOPQRSTUVWXYZ
abcdefghijklmnopqrstuvwxyz
123456789000,000,000.00

I used several common fonts...
Arial, 10 pt (SSRS 2008 default)
Times New Roman, 12 pt (Office 2003 default)
Calibri, 11 pt (Office 2007 default)
Verdana, 11 pt
Tahoma, 11 pt

In the example above, I used normal weight, nothing fancy... If you use bold and underline, which is common for a page/column header or footer, this issue is even more apparent.

It feels similar to the following issue: https://connect.microsoft.com/SQLServer/feedback/details/482312/ssrs-report-font-rendering-issue

A workaround would obviously be to export to PDF and then print, but these are steps that our end users shouldn't have to (and won't want to) put up with to produce reports/invoices/etc. that ultimately go

printing aspx page in pdf format.

  

 Dim ms As New MemoryStream 
Dim doc As New Document(PageSize.A4)
 Dim writer As PdfWriter = PdfWriter.GetInstance(doc, ms)
 'Open the pdf
 doc.Open()
 'Reads the HTML to pdf
 Dim reader As New StringReader(html)
 Dim obj As New simpleparser.HTMLWorker(doc)
 obj.Parse(reader)
 'Close the pdf, but leave the Stream open and set the Stream position to 0
 writer.CloseStream = False
 doc.Close()
 ms.Position = 0 
'Create email
 Dim message As New MailMessage
 message.From = New MailAddress(From)
 message.To.Add(New MailAddress([To]))
 message.Subject = Subject
 message.Body = Body
 'Create attachment from MemoryStream and add it to the message 

Dim pdf As Attachment = New Attachment(ms, "attachment.pdf", "Application/pdf") 
message.Attachments.Add(pdf)
 'Sends mail
 Dim client As New SmtpClient
 client.Host = "smtp.yourdomain.com"
 client.Port = 25
 Try
 client.Send(message)
 Catch ex As Exception
 Response.Write(ex.Message)
 Finally
 End Try
 En

Printing to printer. Not the page but some specific text.

  

Hi!


I do run System.net.Mail on my web pages to send email confirmations. For those who doesn´t have an email I would like to print the letter to a printer.

Below is my code to send a body to the email. It works great. How ever. Could I somehow add a function to my page so when customer has no email the page instead prints the code to our network printer?


Dim htmlView As AlternateView = AlternateView.CreateAlternateViewFromString("    <center> <img src=cid:companylogo> </center><br><br> " & fornamn & " " & efternamn & " " & "<br><br> " & adressen & "<br><br> " & "" & postnummer & " " & "" & postorten & "<br><br><p><strong>Välkommen som medlem i XXXX! </strong></p><p><strong>Tack för din beställning!", System.Text.Encoding.UTF8, "text/html")



running value are not printing in page footer in Sql server reporting Services 2005

  

Hi everybody..

i've created one SSRS in that i've connected to the database having four fields..

now want i want is to calculate the salary page by page and at the last grand

total..

i've kept one extra column in table and kept one running field and made it as 

hidden. i've taken one textbox and placed in page footer with the 

expression="PAGE RECORD TOTAL="& Last(reportitems("Subtotal1").Value)

where subtotal1 is a running field and i'm taking the last value of that.. and printing in

page footer..

Now my problem is when i run the report the value will be present but when

i click on preview or  take the print the value will be disappeared..

please help me.. 


And when i make the running field hidden=false then it will display while printing also..

i dont want to show the running field i want to hide it..

i've created the report with the following link

http://community.dynamics.com/blogs/navteam/archive/2010/03/17/transfooter-and-transheader-functionality-in-rdlc-40-ssrs-41-reports.aspx

please help me


SSRS 2005 Report Printing Additional Blank Page

  

Hi,

New to SSRS 2005 and having some problems printing. I have a report that has only 7 columns and while in layout mode, the body of the report only has a width of not even 7 inches. I have made my left margin 0.2 in, RM at 0 in, TM at 0 in and BM at 0 in as well and yet when I print, I get an additional blank page. All my records print in the first page just fine but I get the additional blank page. This also happens to me on a different report when I change the settings for landscape printing. I am able to fit all the columns in one page using landscape but get an additional blank page for every page that is printed. So instead of printing just two pages of records, I get 2 additional blank pages.

Any help will be greatly appreciated.

Thanks.

 


running value are not printing in page footer in Sql server reporting Services 2005

  

Hi everybody..

i've created one SSRS in that i've connected to the database having four fields..

now want i want is to calculate the salary page by page and at the last grand

total..

i've kept one extra column in table and kept one running field and made it as 

hidden. i've taken one textbox and placed in page footer with the 

expression="PAGE RECORD TOTAL="& Last(reportitems("Subtotal1").Value)

where subtotal1 is a running field and i'm taking the last value of that.. and printing in

page footer..

Now my problem is when i run the report the value will be present but when

i click on preview or  take the print the value will be disappeared..

please help me.. 

 

And when i make the running field hidden=false then it will display while printing also..

i dont want to show the running field i want to hide it..

i've created the report with the following link

http://community.dynamics.com/blogs/navteam/archive/2010/03/17/transfooter-and-transheader-functionality-in-rdlc-40-

Form page considerations (Printing)

  

I'm creating a form to plot musical notes and tabs for the guitar. I'm to the point now where I have most of my code to accomplish what I what it to do. Now I'm adding a print option. Each Time I add a function I trend to have to redo some of the older parts of my form witch I assume I will here as well. What I have is two Shape Containers that I click on to create my notes and now I would like to print my project. How Big should I make my Shape Containers to easily print them to a 8.5x11 page. And can any of you point me to some tutorials or good examples or the print function of VB. It usually takes all the example I find on my own and one of your suggestions to finally get what I'm looking for.

 

Maybe add in some tips on how to print only the Shape Containers as well Right Now I Do a PrintForm(Print PreVeiw) and see all my buttons as well


Help printing .rdl reports using the asp ReportViewer control from a web page to the users client pr

  

I have developed a set of ssrs .rdl reports and am trying to display them from the reportviewer control embeded in my asp web page. The problem is that when I select the print icon on the reportviewer control I am prompted to install ms sql server. I need help here. What is the best way to print .rdl reports from the web page's embeded reportviewer control to the client's local network printer.

Thanks,

 

Steve

 


How to Repeat GridView Header part when Printing that Page

  

Hi All,


I have SharePoint Document Library, and I am getting data from that library and I am binding to my datatable. By using DataTable data I am binding to my GridView. I need to repeat the my GridView Header part, While printing that page, I am getting in first page only, how can I show that GridView Header part in page. Please any suggestions.....

thanks in advance
shekar


Changing the graphics on the home page of a SharePoint site

  
When you create a site in Microsoft Windows SharePoint Services by using the default Team Site template, the home page includes two default graphics. A Windows SharePoint Services graphic appears in the body of the page, and a picture of a house in a circle appears near the site title. You can change these graphics to customize your site. Changing the smaller graphic requires a Windows SharePoint Services compatible Web page editor

Using jQuery to directly call ASP.NET AJAX page methods

  
Here I am looking to explain how to call page methods using jQuery. Using jQuery to directly call ASP.NET AJAX page methods
Categories: 
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