Completed
Last Updated: 24 Jun 2021 10:24 by ADMIN
ADMIN
Tanya
Created on: 13 Feb 2017 10:46
Category: WordsProcessing
Type: Bug Report
6
WordsProcessing: Date and Numeric formatting of merge field is not respected
In the document produced by the mail merge, the date time and numeric formatting applied are not respected and the value is in its default format. 
10 comments
ADMIN
Martin
Posted on: 24 Jun 2021 10:24

Hi Rene,

Thank you for the additional information. I will dive straight to the points:

  1. This behavior is expected when instead of the quotation mark (") a left/right double quotation mark is used (“ & ”). More information on the different quotation mark types can be found in the table in this article. In order to avoid this, I could recommend assuring using the quotation mark (").

  2. This behavior is caused because of a not-handled scenario when applying the Number formating. I logged an item on your behalf in our backlog to handle it: WordsProcessing: Numeric formatting of merge field is not respected when the data is set as double or float. Please, make sure to subscribe to the task so you can be notified when its status changes. 

    In appreciation for bringing this to our attention, I updated your Telerik points.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Coopbase
Posted on: 23 Jun 2021 03:35

Hi Martin,

Sorry for late feedback.  I am making sure that I understand the problem first and here it is.

See attach rar file, I edited the template to demo my problems with it:

1. Why { MERGEFIELD TODAY \@ “MM/dd/yyyy” } always return "06/23/2021" - with double quotes.  I have no way removing it.

2. When the amount have decimal point, numeric formatting is not respected.

--

Rene

ADMIN
Martin
Posted on: 31 May 2021 11:09

Hello,

Thank you for the additional feedback.

I tried to reproduce the described behavior using the provided format and the mentioned assemblies version but on my end, it works as expected. The formated text after mailmerging is in the following format:

Friday, May 28, 2021

In order to demonstrate what exactly I am testing, I am attaching the updated project.

If this is not the case, please, update the project and send it back to us so you can help us to reproduce this behavior.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Coopbase
Posted on: 27 May 2021 10:06

Hello,

Downloaded today Telerik UI for WPF internal build Telerik_UI_for_WPF_2021_2_524_Dev_Hotfix.zip

Testing it, Date formatting of date merge field still NOT RESPECTED.  

 

Below is the format I am using

{MERGEFIELD Date \@ "dddd, MMMM d, yyyy" }

ADMIN
Martin
Posted on: 20 May 2021 11:56

Hi,

I tested this functionality by creating a sample project using the provided formattings ("Date-Time Pictures") and on my end, it works as expected (check WordsProcessing_Formatting.zip).

I inserted the fields in the following way by preserving the type of the quotation marks (the first formatting uses left and right double quotation marks):

editor.InsertField("MERGEFIELD TODAY \\@ “MM/dd/yy”", "«TODAY»");
editor.InsertBreak(BreakType.LineBreak);
editor.InsertField("MERGEFIELD TODAY \\@ \"MMMM d, yyyy\"", "«TODAY»");
editor.InsertBreak(BreakType.LineBreak);
editor.InsertField("MERGEFIELD TODAY \\@ \"d MMMM yyyy\"", "«TODAY»");
editor.InsertBreak(BreakType.LineBreak);
editor.InsertField("MERGEFIELD BAL \\# ####,0.00", "«BAL»");

The result was as follows:

“05/20/21”
May 20, 2021
20 May 2021
10.00

I tried another approach as well by creating a DOCX template with the following merge fields:

{ MERGEFIELD TODAY \@ “MM/dd/yy” }

{ MERGEFIELD TODAY \@ "MMMM d, yyyy" }

{ MERGEFIELD TODAY \@ "d MMMM yyyy" }

{ MERGEFIELD BAL  \# ####,0.00 }

which later imported with DocxFormatProvider, mailmerged again and the result was the same (check WordsProcessing_MergeFieldsFormatting_ImportDocxTemplate.zip).

I am attaching both the projects I created in order to test this functionality. Please feel free to modify them in a way closer to your scenario.

If your scenario is different than the described, please, give us more information on it in order to investigate the case.

Regards,
Martin
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Coopbase
Posted on: 19 May 2021 08:34

LIB 2021.2.517 (17/05/2021)

I have this already and date formatting still shows default format.  Numeric is OK though.

Coopbase
Posted on: 19 May 2021 01:55

Downloaded last night, internal build 517

Numeric field formatting is now OK, so far.

 

But it still not working on DATE though.

\@ “MM/dd/yy”
\@ "MMMM d, yyyy"
\@ "d MMMM yyyy"

It still shows default DATE format.

ADMIN
Peshito
Posted on: 17 May 2021 08:26

Hello,

This item will be available in R2 2021 SP1 Release. 

It is also available with Telerik UI for WPF's latest internal build - LIB 2021.2.517 (17/05/2021) if you need it earlier. 

Regards,
Peshito
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

ADMIN
Dimitar
Posted on: 12 May 2021 07:22

Hello,

The issue is already in development and the fix will be available in the next internal build. Officially the fix will be available in the next service pack as well.

I hope this helps. Should you have any other questions do not hesitate to ask.

Regards,
Dimitar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Coopbase
Posted on: 11 May 2021 13:16

Come on guys.  

You got to fix this issue.  2017, that is almost 5 years?

 

Please, I need this feature badly.