Suppress Blanks in TfrxMemoView?

edited 3:58PM in FastReport VCL 5
I am trying to create an address block and suppress blanks. I have HideZeros set to true but it does nothing. Below is my code

[Uppercase(Trim(<EE."Last_Name">) + ', ' + Trim(<EE."First_Name">))]
[Uppercase(Trim(<EE."Addr1">))]
[Uppercase(Trim(<EE."Addr2">))]
[Uppercase(Trim(<EE."City">) + ', ' + Trim(<EE."State">) + ' ' + Trim(<EE."Zip">))]

Comments

  • edited 3:58PM
    Btw if no one has a in built answer and is reading this, here is a retarded but short solution:

    [Uppercase(Trim(<EE."Last_Name">) + ', ' + Trim(<EE."First_Name">))]
    [Uppercase(Trim(<EE."Addr1">) + IIF(Trim(<EE."Addr2">)='', '', #13+Trim(<EE."Addr2">)))]
    [Uppercase(Trim(<EE."City">) + ', ' + Trim(<EE."State">) + ' ' + Trim(<EE."Zip">))]
  • gordkgordk St.Catherines On. Canada.
    edited 3:58PM
    procedure mLabelOnAfterData(Sender: TfrxComponent);
    var i: integer;

    begin
    for i := TfrxMemoView(Sender).Lines.Count - 1 downto 0 do
    begin
    if TfrxMemoView(Sender).Lines.Strings = '' then
    TfrxMemoView(Sender).Memo.Delete(i);
    end;
    end;
    mlabel is the name of the memoview.
  • edited 3:58PM
    Seriously? There's no way in FastReports to suppress a blank line? This is very nearly a deal-killer for reporting tools.

    Adding programmatic backing to each and every memo field that you want to suppress isn't really a solution.

    Especially for those of us using the FastReports VCL in Delphi where we can't add in backing code and have to handle it within Delphi - we can't add in Event handlers.

    There must be SOME way to suppress the printing of blank lines. This is basic Report Generator 101 stuff.

    Jeff

Leave a Comment