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

view than print mail merge resulting document

2 Answers 61 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Kenneth
Top achievements
Rank 2
Iron
Kenneth asked on 12 May 2014, 03:17 PM
evaluating the richtextbox editor Q1 2014 for silverlight.

I want to allow the user to select a mail merge template for a list I will provide and mailmerge it with a datasource I will provide and display the result in the richtextbox editor, which the user will then presumably print.

I'm not sure how to do that, but I did see that when the user 'manually' performs a mailmerge print is not an option, only save as a file.

2 Answers, 1 is accepted

Sort by
0
Accepted
Missing User
answered on 14 May 2014, 01:19 PM
Hello,

The scenario which you have described is a feasible one by using RadRichTextBox's Mail Merge functionality. I would recommend you to check the SDK MailMerge sample project. Please be aware that when the document is changed in the control, the ItemsSource property of the MailMergeDataSource should be set anew.

As to printing, by default the control would print the current displayed mail whereas the mail merge command bound to the ribbon invokes a save for the merged document. In a nutshell, if you want to print the whole mail merged document, you would need to create a new RadDocument by using the RadRichTextBox MailMerge() method, show the result back into the editor and call RadRichTextBox Print() method. The following code-snippet illustrates how this could be achieved:
RadDocument mergedDocument = this.radRichTextBox.MailMerge();
this.radRichTextBox.Document = mergedDocument;
 
this.radRichTextBox.Print("My document", PrintMode.Native);

Also, please take a look at this help articles for a reference about Printing and Mail Merge functionalities.

I hope this helps! Let me know how it goes.

Regards,
Yancho
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Kenneth
Top achievements
Rank 2
Iron
answered on 12 Aug 2014, 10:38 PM
works perfect;y, thanks.
Tags
RichTextBox
Asked by
Kenneth
Top achievements
Rank 2
Iron
Answers by
Missing User
Kenneth
Top achievements
Rank 2
Iron
Share this question
or