Change Customer Format In Script

pinbotpinbot Texas
edited 10:32AM in FastReport .NET
How can I change a Custom Format in script?

I have a date field that in some cases format as "HHmm MM/dd/yy" which is my default custom format.

In some cases I want to format as just "HHmm" (without the date part).

Thanks,

Comments

  • edited 10:32AM
    Hello,

    You can do it in the BeforePrint event handler:

    Text1.Formats.Clear();
    FastReport.Format.CustomFormat format = new FastReport.Format.CustomFormat();
    format.Format = "HHmm";
    Text1.Formats.Add(format);

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.