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

Merge fields do not have the correct format applied

6 Answers 128 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Brock
Top achievements
Rank 1
Brock asked on 21 Nov 2011, 04:04 AM

This is based on the most recent build we have (downloaded this morning, RadControls_for_WPF_2011_3_1116_Dev_hotfix)

 

When we import a  file in docx format, and do a MailMerge() call, the fields merging appears to work perfectly, except that the style (or ‘format’ in MS Word parlance) is not maintained. Whether it’s bold, underlined, different font, different colour, it doesn’t matter, the text that is merged into that field always goes in with what appears to be the default RadDocument/RichTextDocument format (Verdana, 12 pt).

I’ve not been able to find any properties or anything that seem to indicate that merged values will override the styles/formats of the merge fields they’re replacing. It doesn’t appear as if it’s respecting the “Preserve formatting during updates” setting from MS Word

This is the code being used:

 

private RadDocument MergeDataFieldsWithDocument(RadDocument radDocument)

        {

 

            var mergeFieldsAndValues = DeriveValuesToMergeWithDocumentFields();

 

            radDocument.MailMergeDataSource.ItemsSource = mergeFieldsAndValues;

            return radDocument.MailMerge(false);

        }

 

        private static List<object> DeriveValuesToMergeWithDocumentFields()

        {

            return new List<object>

                       {

                           new

                               {

                                  DATE_TODAY = "test"

                               }

                       };

        }

How can we make it so that the merge fields use the correct format?

Thanks,

Brock

6 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 23 Nov 2011, 02:43 PM
Hi Brock,

There is indeed a problem with the persistence of the style settings of merge fields and we will address the issue shortly.
I have created a PITS issue, which you can track in order to be notified when the bug is fixed.
You can follow the PITS Issue by its ID: 8579
Public Url: http://www.telerik.com/support/pits.aspx#/public/silverlight/8579

Regards,
Iva Toteva
the Telerik team

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

0
Jonathan
Top achievements
Rank 1
answered on 07 Dec 2011, 10:32 PM
Hello:
This also a problem in WPF. My letters are in Arial 10, and the mail-merged fields are coming up in Verdana 12.

I'm hoping you can fix this soon. Meanwhile, is there a work-around?

Is there a way to change the font characteristics back after the merge has taken place, say for example if the merged text were in a separate paragraph or section?

Thanks,
Jonathan
0
Rieni De Rijke
Top achievements
Rank 1
answered on 12 Dec 2011, 03:06 PM
Same problem here in our WPF-application. The fields always appear in Verdana 12.
Could you please look at this problem.

It's a real showstopper when showing a demo to our customers.
0
Boby
Telerik team
answered on 12 Dec 2011, 05:22 PM
Hello Jonatan, Rieni,
We are in process of fixing the issue, and will do our best to fix it for the SP1, coming in a few weeks.
Please, excuse us for the inconvenience. Don't hesitate to contact us if you have other questions.

Regards,
Boby
the Telerik team

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

0
doneill
Top achievements
Rank 1
answered on 23 Nov 2012, 09:05 PM
I have tried to download the solution for this issue from the PITS system for the link referenced in this thread, but get a server error:

Home / Server Error

It seems there was a problem with our server.

To return on the right track choose one of these:

  • Hit the “Back” button of your browser
  • Use the navigation above
  • Try the search bar
  • Head to the Homepage
  • Cheer up and get a Free trial

0
Petya
Telerik team
answered on 27 Nov 2012, 05:29 PM
Hello D'Arcy,

Thank you for contacting us!

The problem seems to be in the Uri that the button navigates to. The correct one is http://www.telerik.com/account/your-products/product-versions.aspx?pmvid=2754&pid=571. This should be fixed shortly.

As a side note, clicking on this button leads to the download section of your account, more precisely to the first version in which the fix was included. In the particular case this is 2012 Q1 SP1 (2012.1.326.) That said, I would suggest to upgrade to the latest version instead as the fix is also included there among other features and solutions.
 
Greetings,
Petya
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
RichTextBox
Asked by
Brock
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Jonathan
Top achievements
Rank 1
Rieni De Rijke
Top achievements
Rank 1
Boby
Telerik team
doneill
Top achievements
Rank 1
Petya
Telerik team
Share this question
or