Skip to Content
0
Former Member
Jan 23, 2008 at 10:56 AM

ApplyFont does not always work on CR XI (.NET, VS 2005)

29 Views

Post Author: mars2712

CA Forum: .NET

Hi!

I want to change the font of TextObjects and FieldObjects in my Crystal Report Documents.The documents were developped under CR 9 + are compatible with CR XI.The application to change the font is a .NET application (VS 2005 with CR XI libraries).It is possible to do this - without any problems - with CR9 (.NET CR 9 libraries) . But: - for the same reports it doesn't work with CR XI libraries.If I delete some objects from the reports (mostly some subreports), then the font is applied like expected.

Does anybody know, how to solve this problem without changing the reports?Is there anything new to do within CR XI on appling fonts, comparing with CR9?

Thanks!Mars2712

-


here some code:Dim objFontSize As Single = CType(20, Single)Dim objFontStyle As System.Drawing.FontStyle = FontStyle.RegularDim objMyFont As Font = New Font("Tahoma", objFontSize, objFontStyle) Dim txtRptObject As CrystalDecisions.CrystalReports.Engine.TextObject .... txtRptObject.ApplyFont(objMyFont).....----