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

Top 5 Contributors of the Month
Post New Web Links

.rdlc and PDF - font overlaps horizontally/does not render correctly when printed

Posted By:      Posted Date: April 10, 2011    Points: 0   Category :

Running Visual Studio 2010
Creating .rdlc reports using v10.0 assemblies.
Simple report of 1 textbox with text.
View report using report control in WinForms app or render directly to PDF via WinForms code.

All reports look fine in design and in the viewer (report viewer or Adobe PDF).

The problem is all reports are rendering incorrectly when printed (printed from the report viewer or PDF).  I originally thought this was a PDF probelm but I have the same problem priting from the report viewer control on a WinForm.

The text when printed is squished.  Line height appears to be fine but horizontally the font is overlapping every letter.

It also is not printing with the font I selected during design.  Again the reports look correct during design but not when printed.

I have tried several different fonts including installing the GNU freesans.  No difference.

When checking the PDF Properties (File->Properties->Fonts) the only font listed is Helvetica which I don't even have on my machine (ie. I can't select this font to design a report).

If I configure the PDF to print as an image it prints correctly.  This still does not explain or resolve what to do when printing directly from the report viewer control.

Any advice is appreciated.


View Complete Post

More Related Resource Links

ComboBox in non selected accordion Pane do not render correctly

the combo boxes in the originally selected accordion pane work just fine. But when I navigate to one of the other pane those combo boxes show up as a textbox with a very tiny square button for a dropdown arrow and no popup dropdown list to select from. below is my code for the accordion<cc1:Accordion ID="Accordion1" HeaderCssClass="accordionHeader"              HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent" Font-Bold="True" runat="server">             <Panes>                 <cc1:AccordionPane ID="aP1" runat="server">                     <Header >ComboBox 1</Header>                     <Content>                         <cc1:ComboBox ID="cmb1" runat="server" RenderMode="Block">                             <asp:ListItem Text="item 1"></asp:ListItem>                 

Rs render to PDF is not displaying barcode font




I'm rendering a report (RS 2005) programatically to PDF. One of the text boxes is supposed to display barcode font and it is actually displaying just the numbers. How can I fix this.


Thanks in advance

RDLC reportitems #error when printed



I am running into an issue with a report that uses the ReportItems collection within the header of a RDLC report.

I am using ReportViewer a asp.net 3.5 webforms application to display the report.

I use the following code in a group footer to determine the group number "=Fields!ROW_NUM.Value". The ROW_NUM column is generated by a sql stored procedure that adds a sequential integer to each row exported. I then use: =Min(ReportItems!textbox353.Value).ToString() in the reports header to retrieve the minimum row number displayed on a page.

Doing this i am able to provide the user a row count on each of the reports pages: 1-23 of 1021 records are displayed.

This works well for reportviewer and excel export but produces a #error - #error of #error when printed or exported to pdf.

Any insight to why this issue is occuring or how it can be resolved is appriciated.



Craig W.

DrawString (GDI+) could not render khmer script correctly


I'm trying to send khmer script(unicode) string to printer using PrintDocument provided by the .NET framework.

Unfortunately it seems to me that the Graphics.DrawString() does not render khmer script correctly.

Platform: Windows 7 Ultimate
IDE: VS 2010 Ultimate + .NET Framework 4

Here is the full sample code: /

using System;
using System.Windows.Forms;
using System.Drawing;
using System.Drawing.Printing;

namespace PriintKhmerUnicode
  static class Program
    static PrintDocument printDoc = new PrintDocument();
    static Font font = new Font("Khmer UI", 16);
    static string text = "??????";

    /// <summary>
    /// The main e

animate effect work but the render items are messed up.


Hi all,

     I have a very unique problem, humm i think. I am using a jquery effect that animate bounce effect, i have a line in my javascript pageLoad function $("#UserBrowserInfoDIV").show('bounce'); - the effects run smoothly but what it does is mess up the bolded text in the div. I have try the items inside the div without bolding and it works fine and no render problem but when bolded the text that are bolded is quite messed up, and barely readable.

Please let me know is there anything else i can do i really would like use this effect.

P.S all the effect have the same render problem, and i am using ie8 under compatibility mode.





Centering an img in a div both horizontally and vertically


I realize this is simply an HTML question, but I'm having a difficult figuring out the CSS stuff to center an <img /> tag within a <div> tag.

<div style="width: 180px; height: 180px; padding: 10px; margin-top: auto; margin-bottom: auto;">
  <img src="file" alt="" style="width: 160px; height: 80px;" />

It centers horizontally just fine, but I cannot get it to center vertically within the div.

Can anyone point out what I'm missing???

Category attribute of user control property does not work correctly in categories tab.



I have a User Control (ascx) and a property which a want to display in my categories tab in Visual Studio in the category named "Styles".

[Category("Styles"), DefaultValue(""), Description("The value for formating something.")]
public String MyFormatProperty
set { /* the code for set */; }
get { /* the code for get */; }

And here is the problem: Actually I do not need a get, because I only have to set the property (write only property). But when I omit the get, the property is displayed in the "Misc" category in the categories tab in Visual Studio. Only when I code the get as well, then the property is displayed correctly in the "Styles" category in the categories tab in Visual Studio.

Does anybody know why? How can I display the category correctly only with set?

Thanks, S.

Foundations: Render Text On A Path With WPF


With Windows Presentation Foundation (WPF) you can lay out text on a path, then animate the individual points defining the path and watch the characters bounce around in response.

Charles Petzold

MSDN Magazine December 2008

Smart Clients: Build A Windows Forms Control To Consume And Render WSRP Portlets


Smart client apps use local resources, provide a rich client experience, and support intelligent install mechanisms. Web services offer powerful interoperability and integration features. Find out how to combine them to develop integrated apps that incorporate data from disconnected sources.

Carl Nolan

MSDN Magazine February 2006

Web Q&A: Font Sizing, Internationalization in JScript, and More


Font Sizing, Internationalization in JScript, and More.

Edited by Nancy Michell

MSDN Magazine June 2003

RDLC Report Hide Export Option

The article RDLC Report Hide Export Option was added by mandandeo on Sunday, August 15, 2010.

protected void ReportViewer1_PreRender(object sender, EventArgs e) {DisableFormat(ReportViewer1, "Pdf"); }protected void DisableFormat(ReportViewer viewer, string formatName) {const System.Reflection.BindingFlags Flags =System.Reflection.BindingFlags

Videos don't work correctly on iPad


I have tried all the video formats available but none work correctly including iPod option. Any suggestions?

Unwanted page breaks in rdlc report



I hav a report that has a table group =Fields!Location.Value

and in the cells I do this

=Avg(IIF(Fields!Contaminant.Value = "Element1", cDbl(Fields!Value.Value), cDbl(0)))

what I am getting is 1 row for each location then there is a pagebreak! what i want is the next location right below the  first I looked through for all the page breaks with no luck. Any ideas?

Convert 2005 RDLC to 2008 using VS2010


Hi and thanks.


I'm getting an error on serveral reports that I built  in VWD2005 (express) using the reportviewer control.  Trying to edit the rdlc file in VS2010, VS2010 asks if i want to convert the file to RDLC 2008 format and I click ok.  When I build the site, I get this error (and of course also when the report is ran):


Error 1 The report definition is not valid.  Details: The report definition has an invalid target namespace 'http://schemas.microsoft.com/sqlserver/reporting/2008/01/reportdefinition' which cannot be upgraded. C:\inetpub\wwwroot\mastercardlcm\Reports\WorkLists\OpenSRStatus.rdlc 1 


Here is my web.config concerning the RDLC assemblies, etc.

			<add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false"/>
		<compilation debug="true">
				<add assembly="Microsoft.ReportViewer.WebForms, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
				<add assembly="Microsof

Is it possible to change the title bar background and the font style on default template?



Is there any way to change the default top link /title bar picture and the fonts of the title without breaking anything in the layout/structure?

I have changed the theme to Obsedian and I would also like to change the picture of the title bar of this theme and also the font/style of the title, top link bar, menus..etc. Is there a way to do this?

Please note: I am using WSS 3.0 and I am not the Administrator of the sharepoint. I am only the site admin of some sites on this sharepoint. I can do some basic customization using SPD.

Basically, what I am trying to do is that I want to set up a sharepoint site, however I want to make it NOT look like a sharepoint site.Well I know this is possible, but for my case it might be just partially possible due to the limitation that I am not the Site collection admin and hence I do not have direct access to the server itself.

What I want is to hide most of the sharepoint links/menus/bars, etc and use my own buttons/hyperlinks etc .. for user to navigate on the sites.

Thanks in advance for your help/advices.



Logout not redirecting correctly


I have the following control on my master page


asp:LoginStatus ID="LoginStatus1" runat

Breaking news crawing horizontally web part in MOSS site



I would like to know which approach would be the best to show breaking news which will craws horizontally in MOSS site

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