Format Problem

edited 8:40PM in FastReport .NET
I'm testing FastReport with a Demo-Version (1.3.46.0) and I have Formatting-Problems. See attached c#-test. Expected: <" Andrew Fuller 1.234,00">, but was: <" Andrew Fuller 1234">. Where is the problem ?

Comments

  • edited 8:40PM
    Hello,

    The reason is in SqlDecimal data type. It cannot be formatted using String.Format function (which is used in FR to format values).

    SqlDecimal d = (SqlDecimal)1234;
    MessageBox.Show(String.Format("{0:n}", d)); // you will see 1234 instead of 1,234.00
  • edited 8:40PM
    Thanks. Is there a possible Solution ? Because of some reasons we use only SqlDecimal, SqlBoolean and SqlDateTime.
  • edited 8:40PM
    You may use ToDecimal function in the Text object:
    [ToDecimal([Table1.Column1])]

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.