FR4 frxReportBeforePrint HighLighting

edited December 2013 in FastReport 4.0
Hello!

I attempted to highlight values, i do so...
procedure TIWUserSession.frxReportBeforePrint(Sender: TfrxReportComponent);
begin
if Sender.Name = 'MemoDataUpornost' then
begin

  if double(TfrxMemoView(Sender).Value) >= 147.0 then
  TfrxMemoView(Sender).Color := clRed
    else
  TfrxMemoView(Sender).Color := clGreen;

end;

But result is shifted for one row. So if value is 147 the next row is painted red, not the one with right conditions.
How to work around this?

I use FR4 embaded in Delphi XE5

Comments

  • gpigpi
    edited 12:29PM
    use
    if double(frxReport.Calc(TfrxMemoView(Sender).Text)) >= 147.0 then
    instead of
    if double(TfrxMemoView(Sender).Value) >= 147.0 then
  • edited 12:29PM
    I have the same problem.

    procedure TrepRankTTest.frxRankTTestBeforePrint(Sender: TfrxReportComponent);
    begin
    if sender.Name = 'dsPairedTTestGIBB' then
    begin
    if TFrxMemoView(sender).value) = 'HS' then
    TFrxMemoView(sender).Font.Color := clred
    else if TFrxMemoView(sender).value) = 'PS' then
    TFrxMemoView(sender).Font.Color := clblue
    else if TFrxMemoView(sender).value) = 'NS' then
    TFrxMemoView(sender).Font.Color := clblack
    else
    TFrxMemoView(sender).Font.Color := clblack;
    end;
    end;

    This only result in the following row being red or blue.

    I tried the frxReport.Calc(TfrxMemoView(Sender).Text)) it also doesn't work.

    I must add that the frxMemoView shows the value of a frxdbDataset.

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.