Formatting of Group total shown in the header

I am successfully showing the group total in the header, in the way it is explained in the FR manual and also shown in the main demo ???Frdemo.exe??? .

There is one problem though. That is, even if the total is shown correctly, the formatting is gone. That is instead of showing

Sum: 1,234.56

it is shown as

1234.56

This is evident in your demo too.

Please suggest a solution, as it is very important for my current project.

I am using the FR 3.24.2 Standard with Delphi 7.

Regards

Jayan

Comments

  • edited 6:18PM
    has u set display format to number
  • edited 6:18PM
    I have sorted the problem. Really speaking the solution is very simple.

    I used the Format() function in the script.

    irw10062, thanks for your advice, but that was the first the I had done. The thing that baffled me is, how come the formatting gets destroyed by just assiging some value in the script. That part still is a mystery. May be there is another solution too.

  • gordkgordk St.Catherines On. Canada.
    edited 6:18PM
    since you based it on the demo you probably did something like
    procedure Memo4OnBeforePrint(Sender: TfrxComponent);
    begin
    if Engine.FinalPass then
    Memo4.Text := 'Sum: ' + VarToStr(Get(<Sales."Company">));
    end;
    you are resetting the text of the memo to contain a string so it is not numeric and no formatting will occur, therefore you must use the format function to preformat the value returned in vartostr().

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.