Custom format
Is there a way to add a "custom format" in the "Select Format" window?
I need to use calendars that do not exist in Windows and I would need to add custom formats as "Solar Calendar", "Serial Calendar", etc..
Thanks
I need to use calendars that do not exist in Windows and I would need to add custom formats as "Solar Calendar", "Serial Calendar", etc..
Thanks
Comments
It's not possible without modifying the source code of FastReport.Net.
Thank you
- you have to create own format based on FastReport.Format.FormatBase class;
- register it in the AssemblyInitializer class (see AssemblyInitializer.cs file);
- modify the TypeConverters\FormatConverter.cs file (ConvertFrom method);
- modify the FastReport.Forms.FormatEditorForm class to add the format ui editor (most complex task).
It would be nice that we can register a formater from our application.
For example, I would need to add in "Select Format / Date" an industrial calendar (a date calendar used in many industries), or Solar Calendar used by some users in the Iran and not supported by .Net.
Also, some customers want dates like 10AUG08.
It is not necessary that the user enters parameters for the format. I am asking to be able to register custom closed formats, without user parameters.
Another option would be to offer a delegate or event from the source to format the text to be printed out.
Thank you
It's hard enough to make existing format system extendable. I will try to do this in the next major version.