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

Print / print preview error message: Eval failed.

1 Answer 81 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Edward
Top achievements
Rank 1
Edward asked on 28 May 2012, 04:42 PM
At first it can print fine.  But after several attempts (didn't count but at least 10) it will begin to throw an error message "Eval failed" when calling the editor.Print line.  Once it starts to fail the app cannot print anymore and has to restart IE.

   at System.Windows.Browser.HtmlWindow.Eval(String code)
   at Telerik.Windows.Documents.UI.HtmlPrinter.Print(RadDocument document, PrintSettings settings, Boolean preview)
   at Telerik.Windows.Controls.RadRichTextBox.Print(PrintSettings printSettings)
   at Telerik.Windows.Controls.RadRichTextBox.Print(String documentName, PrintMode mode)
   at Kinark.KIDS4.SL.DocEditor.rtbEditor_CommandExecuting(Object sender, CommandExecutingEventArgs e)
   at Telerik.Windows.Controls.RadRichTextBox.OnCommandExecuting(CommandExecutingEventArgs e)
   at Telerik.Windows.Documents.RichTextBoxCommands.RichTextBoxCommandBase.Execute(Object parameter, Boolean focusCaret)

private void rtbEditor_CommandExecuting(object sender, Telerik.Windows.Documents.RichTextBoxCommands.CommandExecutingEventArgs e)
{
    if (e.Command is PrintCommand)
    {
        if (e.CommandParameter != null && e.CommandParameter.ToString() == "Html")
        {
            rtbEditor.Print(Title, Telerik.Windows.Documents.UI.PrintMode.Html);
            e.Cancel = true;
        }
 
        if (e.CommandParameter != null && e.CommandParameter.ToString() == "HtmlPreview")
        {
            rtbEditor.Print(Title, Telerik.Windows.Documents.UI.PrintMode.HtmlPreview);
            e.Cancel = true;
        }
    }
}

1 Answer, 1 is accepted

Sort by
0
Vasil
Telerik team
answered on 31 May 2012, 02:21 PM
Hi Edward,

Unfortunately, we were not able to reproduce this failure. Could you elaborate more about which version of RadControls for Silverlight you are using in your project? In case the problem is browser or OS specific, please include the exact version of the browser and operation system.

Looking forward to your reply.

All the best,
Vasil
the Telerik team

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

Tags
RichTextBox
Asked by
Edward
Top achievements
Rank 1
Answers by
Vasil
Telerik team
Share this question
or