FastReport icon indicating copy to clipboard operation
FastReport copied to clipboard

Custom Mask TextObject

Open jeftegoes opened this issue 5 years ago • 2 comments

Hi!

There are some fields I need to format, I created the following (function:

(...)
using System.ComponentModel;
(...)
private string FormatMask(string value, string mask)
    {
      MaskedTextProvider pro = new MaskedTextProvider(mask);
      pro.Add(value);
      return pro.ToString();
    }

Works perfectly in FastReport Community (Preview Mode) work design

But when using in webreport presents the error attached: error webreport

I already added System.ComponentModel including

but it did not work

my json json

jeftegoes avatar Dec 19 '19 13:12 jeftegoes

Does anyone know an alternative to format fields through fastreport?

jeftegoes avatar Dec 19 '19 18:12 jeftegoes

Any use of MaskedTextProvider will not work for web (ASP.NET Core) at all. Because MaskedTextProvider requires Winforms runtime and related Winforms components (such as those in System.ComponentModel.TypeConverter.dll asssembly, and it is of course not available at all for web.

Therefore this bug should be closed instead of letting this marked/tegged as help wanted.

cc @KirillKornienko

eriawan avatar Sep 04 '22 16:09 eriawan