how to display with different value of field?

edited 12:20AM in FastReport 3.0
hello
i want to display a dataset field with different types,such as the the field 'wife' of the dataset is not empty,then i want to show wife:.....,if the field is empty,then will display nothing,how to do this?
thanks.

Comments

  • PJCFPJCF Jersey, Channel Islands, UK
    edited 12:20AM
    I have done a similar thing using the following code for in the OnBeforePrint for Memo25 (title field) and Memo23 (data field)
    procedure Memo25OnBeforePrint(Sender: TfrxComponent);
    begin
      if <frxDBPO."PODue"> < 1 then begin
        Memo25.text := '';
      end else begin
        Memo25.text := 'For delivery by:';
      end;
    end;
    
    procedure Memo23OnBeforePrint(Sender: TfrxComponent);
    begin
      if <frxDBPO."PODue"> < 1 then begin
        Memo23.text := '';
      end else begin
        Memo23.text := <frxDBPO."PODue">;
      end;
    end;
    
    begin
    
    end.
    

    Hope that helps - Peter

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.