Textbox border becomes thicker after rendering RDLC report to pdf - c#

I am making rdlc report and I am rendering it to pdf, but for some reason textboxs' borders become thicker after this process. More strange is that if I copy (only location and ZIndex properties change) one of the textboxes (which border becomes thicker) in another place, the border of copied textbox isn't thick.
This is the result.

This is problem only in Microsoft edge (while opening generated pdf file in it). My report looks nice in Opera and Google Chrome browsers. I tried to report this problem to Microsoft, but their web page told me that it wasn't able to identify I was person or not.. :)

Related

C# Webbrowser Element displays HTML Table differently

I'm displaying a HTML page containing a table in my webbrowser element on a windowsform. However some parts of the table appear differently in the webbrowser element than when I open the HTML file with any browser (including IE).
Here is the comparison:
http://imgur.com/a/1QRs1
Top: Any browser ,
Bottom: Webbrowser Element
(In case the link dies someday : some borders appear thicker than they should and vertical text is displayed as horizontal text).
Is there any way to fix this? What might cause this?
The WebBrowser control is by default set to emulate IE7, which is probably the cause for this. You can change the IE-Level used for the WebBrowser control by creating a registry entry, though it must be set for each individual executable.
For more details (like the exact registry key and possible values) see the following article on Code Project: Configuring the emulation mode of an Internet Explorer WebBrowser control

.rdlc report on reportviewer not rendering the controls correctly

I have this report which I am recreating from access and it is not like a regular report with tables it actually uses a lot textboxes and rectangles, I figured if I kept the width of the report to 8.1 and length to 8.9 then i set all the margins to 0.1 so it print one page so that all good but when I place a textbox on the designer to where I want it to be then I run the report and see that they are placed else where soo why is it not rendering correctly is my question? is there an easier way to create an .rdlc report in Asp.net webform that I am unaware of?
Visual Studio 2008
Report Viewer 9.0
.Net 3.5
Shows up like this in the report viewer:
From your screenshots it seems that every control is smaller than its content.
Resize your textboxes or change font size; you can also modify Padding property to free some space. After this operation try setting CanGrow property to False for every control that don't need to grow vertically (i.e. multiline TextBox).
Also note that ASP.NET ReportViewer is not very good in displaying complicated reports; try export your report in PDF using the built-in functionality: if the result is better use LocalReport.Render Method to render it directly in PDF.

Change SQL Server Report Viewer Control color properties?

I'm using asp.net and report viewer control in a web page. I want to format its colors to match the page.
What properties do I need to set to change the backcolor or other style properties of the below image only(it appears inside the report viewer control)? Can I change them from the reportviewer control or do I need to edit the markup of the .RDL file? If these properties can be changed in the RDL file where should I look to change them?
Please, I only want to know if I can change the colors/properties of what I show in the image below. Thanks
You could look at the styles used by the control when it's rendered on the page and override them on your own CSS file. Just make sure you reference your css file on the page containing the report viewer control.
Worst case scenario, you can apply your own styles using jQuery. All you need to know is the ids or classes (or whatever selector is appropriate) of the html elements when the control is rendered.
The bottom line is that you can accomplish this because the report viewer control is not some sort of ActiveX control or Applet of any sort. The only thing on this control that actually uses an ActiveX control is the "print" icon, which, if I recall correctly, can send the output directly to the default printer w/o asking you to select one when used within Internet Explorer. On other browsers, doesn't even render the print icon.

Can the .net reportviewer control be fully operated by code only (ie., minus the toolbar)

Just started on a touchscreen based project that uses the reportviewer control. I will obviously be putting my own big buttons for report navigation , export to pdf etc since even people with tiny fingers will have a hard time clicking the out of box toolbar that comes with this control (see below screenshot). Can I do all of this from code
1) Show next / prev/first /last page of report
2) Show print dialog/page setup dialog/print layout
3) Export to pdf
Thats all we need for now. I am going thru the msdn samples meanwhile. Not yet found any code to do all that the toolbar shown does. thank you
Yes, you can. Assuming your application is Windows app, refer to ShowXXXXX properties of ReportViewer.
http://msdn.microsoft.com/en-us/library/microsoft.reporting.winforms.reportviewer_properties%28v=VS.80%29.aspx
Exporting:
http://social.msdn.microsoft.com/Forums/en/vsreportcontrols/thread/7a2ffdd4-8e25-43f1-863d-505941968b77
Printing:
http://social.msdn.microsoft.com/forums/en-US/vsreportcontrols/thread/9f52d79d-5baf-4e84-97d5-7dbba6623b89
Update: As MS has deleted documentation of reportviewer (the first link above), following might be an alternative.
https://learn.microsoft.com/en-us/sql/reporting-services/application-integration/using-the-winforms-reportviewer-control?view=sql-server-2017

Printing in landscape from a Windows Forms WebBrowser control

I have a WebBrowser control in a Windows Forms Host in a WPF application. I know that in order to print it's contents, I use simply WebBrowser.Print(), however, how can I tell the printer to print the contents in landscape rather than a portrait orientation? I've been searching the Internet on this and oddly enough, it seems to be actually something that is a bit hard to do -- is this really the case? It seems odd to me that it wouldn't be easily implementable.
Thanks!
INFO: WebOCHostCSharp.exe Hosts the WebBrowser Control in C# .NET
http://support.microsoft.com/kb/326217
The Print(String) method prints a document and does not display a dialog box. This method uses a Microsoft HTML (MSHTML) print template to automatically control print options such as paper size, orientation, and number of copies.
Note: This project does NOT contain this mystery overloaded method "Print(string)", It's actually called "PrintFormatted(string)"

Categories