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

Database Merge and Save in New Folder

1 Answer 34 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Randy
Top achievements
Rank 1
Randy asked on 23 Jul 2010, 02:23 PM

Hello,

I am evaluating the Editor control for possible use.  I would like to know if this scenario can be accomplished using it.

1. There will be some RTF files on the web server, the files would contain tags or merge fields for a database merge.  These RTF files would serve as templates.  Admin users could edit the content using the RichTextBox and save the changed RTF file to the same folder.

2.  Other users would fill out a form, the form data is stored in a database.

3. The form data is merged with the RTF template and the resulting new RTF file is stored in a new folder on the web server that is specific to the user.

4. The RTF from step 3 is converted to a PDF in the same folder.

If possible, steps 3 and 4 would be done programitically and the process would be invisible to the user. In other words the user does not need to open the document in the Editor choose a location, and save.  They simply fill out the form in step 2, click a button, and steps 3 and 4 are performed.

Thank you very much,

Randy

1 Answer, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 28 Jul 2010, 03:54 PM
Hi Randy,

RadEditor offers the following three features:
- import from RTF to HTML
- export from HTML to RTF
- export from HTML to PDF

RadEditor does not offer direct conversion from RTF to PDF on the server.
RadEditor does not offer mail merge functionality and you should implement it yourself.
Perhaps the easiest way to tackle this task would be to use *system* strings that have some fixed starting and ending characters, e.g. ##FirstName##, or @@FirstName@@ - or something similar.
You should instruct your users what the list of those *system*strings is, so that they can insert those where needed. Then, on the server side, all you need to do is run some simple String.Replace methods that will replace such a string with the exact database row data.

Please, note that the import from and export to RTF feature is still in development and has many limitations.

RadEditor should be also visible on the page or at least hidden with style="display:none" because in other case you will be unable to export its HTML content to PDF or RTF through the OnExportContent event.


All the best,
Rumen
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Editor
Asked by
Randy
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Share this question
or