2.08 Shift Relative To Simulator
Using TfrxMemoView Only
=======================
procedure MainDescriptionOnAfterData(Sender: TfrxComponent);
var i: integer;
begin
for i := TfrxMemoView(Sender).Lines.Count - 1 downto 0 do
begin
if TfrxMemoView(Sender).Lines.Strings[i] = '' then
TfrxMemoView(Sender).Memo.Delete(i);
end;
end;
Using TfrxMemoView & TfrxRichView (Recommended)
===============================================
May refer to http://www.sql.com.my/wiki/Fast_Report_-_Shift_Relative_To_Simulator
Using TfrxRichView - Method 1
=============================
- with Description & More Description
- In the richview enter as follow...(1 line only)
[HLTrim(<Document_Detail."Description">)][HLTrim(<Document_Detail."Description3">)]
- Copy Paste below Code to Code Tab
function AddReturn:String;
var lSL: TStringList;
begin
lSL := TStringList.Create;
try
lSL.Add('');
lSL.Add('');
Result := lSL.Text;
finally
lSL.Free;
end;
end;
function HLTrim(const Data : string): string;
begin
Result := '';
if Trim(Data) <> '' then
Result := Data + AddReturn;
end;
Using TfrxRichView - Method 2 (Recommended)
===========================================
- To show as following
Description
Description2
Description3
Remark1
Remark2
SerialNumber
- In the richview enter as follow...(3 lines only)
[AddDesc1n2][<Document_Detail."Description3">]
[AddRmk1n2]
[GetSN(<Document_Detail."DtlKey">)]
- Copy Paste below Code to Code Tab
function AddDesc1n2: string;
var lSL: TStringList;
i: integer;
begin
lSL := TStringList.Create;
try
lSL.Add(<Document_Detail."Description">);
lSL.Add(<Document_Detail."Description2">);
for i := lSL.Count -1 downto 0 do
begin
if Trim(lSL[i]) = '' then
lSL.Delete(i);
end;
if Trim(<Document_Detail."Description3">) <> '' then
lSL.Add('');
Result := lSL.Text;
finally
lSL.Free;
end;
end;
function AddRmk1n2: string;
var lSL: TStringList;
i: integer;
begin
lSL := TStringList.Create;
try
lSL.Add(<Document_Detail."Remark1">);
lSL.Add(<Document_Detail."Remark2">);
for i := lSL.Count -1 downto 0 do
begin
if Trim(lSL[i]) = '' then
lSL.Delete(i);
end;
Result := lSL.Text;
finally
lSL.Free;
end;
end;