This is a migrated thread and some comments may be shown as answers.

Broken printing with Q2 2011

3 Answers 60 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Thomas asked on 11 Aug 2011, 10:43 AM
since updating to Q2 2011 I am not able to print a simple RadDocument out of a RadRichTextBox.

We are using version 2011.2.712.1040.

  <Button Name="btnPrint" Content="Print" Click="btnPrint_Click" />
  <telerik:RadRichTextBox Name="richTextBox" Width="200" Height="200" />
My Code-Behind  
private void btnPrint_Click(object sender, RoutedEventArgs e)
  richTextBox.Document = new RadDocument();
  richTextBox.Print("Test", PrintMode.Native);

I get the following exception after clicking the print button:
Details zum Fehler auf der Webseite

Benutzer-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0E; .NET4.0C)
Zeitstempel: Thu, 11 Aug 2011 09:44:25 UTC

Meldung: Unhandled Error in Silverlight Application
Code: 4004    
Category: ManagedRuntimeError       
Message: System.NullReferenceException: Der Objektverweis wurde nicht auf eine Objektinstanz festgelegt.
   bei MS.Internal.XcpImports.MethodEx(IntPtr ptr, String name, CValue[] cvData)
   bei MS.Internal.XcpImports.MethodEx(DependencyObject obj, String name)
   bei System.Windows.UIElement.UpdateLayout()
   bei Telerik.Windows.Documents.UI.DocumentPrintPresenter.UpdateEditorLayout()
   bei Telerik.Windows.Documents.UI.DocumentPrintPresenter.DoOnDocumentChanged()
   bei Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnOwnerChanged()
   bei Telerik.Windows.Documents.UI.DocumentPrintPresenter.set_Owner(RadRichTextBox value)
   bei Telerik.Windows.Controls.RadRichTextBox.InitActiveEditorPresenter()
   bei Telerik.Windows.Controls.RadRichTextBox.set_ActiveEditorPresenter(IDocumentEditorPresenter value)
   bei Telerik.Windows.Controls.RadRichTextBox.<>c__DisplayClass22.<Print>b__20(Object o, EventArgs e)
   bei Telerik.Windows.Documents.UI.DocumentPrintPresenter.OnPrintingStarted()
   bei Telerik.Windows.Documents.UI.DocumentPrintPresenter.pd_BeginPrint(Object sender, BeginPrintEventArgs e)
   bei MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
   bei MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)     

Zeile: 56
Zeichen: 13
Code: 0
URI: http://localhost:20606/RadControlsSilverlightApp2TestPage.aspx

If I use the Q1 libraries (2011.1.315.1040) everything is working fine.

What am I doing wrong here?

regards Thomas

3 Answers, 1 is accepted

Sort by
Top achievements
Rank 1
answered on 11 Aug 2011, 10:53 AM
Sorry, I didn't see that there is already another thread with this problem ( Maybe you could merge the two?
Iva Toteva
Telerik team
answered on 11 Aug 2011, 02:00 PM
Hi Thomas,

Unfortunately there is a bug with Silverlight printing in the Q2 official release (2011.2 712), which was introduced at a very late stage of development and passed in the final build. The good news is that we fixed it immediately in a subsequent build just a bit after that. You can download a hotfix from the Latest Internal Build from your account (Internal Builds Download section).

the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Top achievements
Rank 1
answered on 11 Aug 2011, 02:04 PM
Ok, thanks.
Asked by
Top achievements
Rank 1
Answers by
Top achievements
Rank 1
Iva Toteva
Telerik team
Share this question