1

Topic: In FastReport to hide a component memo!

Delphi XE7 is built in FastReport but why that removed possibility to write the code inside FastReport, I think all right, probably there is an exterior influence. And here found possibility but why that does not work,  memo does not disappear?))) do not prompt in what the reason, declared variable MyMemo: TfrxMemoView; also I write: MyMemo: = frxReport1.FindComponent (' Memo681 ') as TfrxMemoView;
MyMemo. Visible: = False;?
Here the full code:

procedure TDocForm. PrintCheck;
var
MyPage: TfrxPage;
MyMemo: TfrxMemoView;
begin
if not frxReport1.LoadFromFile (ExtractFilePath (Application. ExeName) + ' Reports\PrintChecks.fr3 ') then
begin
Application. MessageBox (PChar (' the report file "' + ExtractFilePath (Application is not found. ExeName) + ' Reports\PrintChecks.fr3 ' + '"! '), nil, MB_OK or MB_ICONERROR);
Exit;
end;
try
with frxReport1 do
begin
odsChecks. Close;
odsChecks. SetVariable (' NOMER ', DocDS.FieldByName (' doc_id ').AsInteger);
odsChecks. Open;
Variables. Items [Variables. IndexOf (' sum_string ')].Value: = ' "' + SumToString (odsChecks. FieldByName (' SUMMAF ').AsFloat) + '"';
Variables. Items [Variables. IndexOf (' resident ')].Value: = FloatToStr (odsChecksRESIDENT.Value);
if odsChecksCOMMUNAL_SIGN.Value = 0 then
begin
MyMemo: = frxReport1.FindComponent (' Memo566 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo567 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo568 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo569 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo570 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo571 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo572 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo573 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo574 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo575 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo576 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo577 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo578 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo579 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo580 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo581 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo582 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo679 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo680 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo681 ') as TfrxMemoView;
MyMemo. Visible: = True;
end
else
begin
MyMemo: = frxReport1.FindComponent (' Memo566 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo567 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo568 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo569 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo570 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo571 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo572 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo573 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo574 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo575 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo576 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo577 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo578 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo579 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo580 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo581 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo582 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo679 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo680 ') as TfrxMemoView;
MyMemo: = frxReport1.FindComponent (' Memo681 ') as TfrxMemoView;
MyMemo. Visible: = False;
end;
//
end;
finally
if CHECK_ID = 1 then
begin
MyPage: = frxReport1.FindComponent (' Page11 ') as TfrxPage;
MyPage. Visible: = True;
frxReport1.PrintOptions. ShowDialog: = False;
frxReport1.PrepareReport;
frxReport1.Print;
end
else
if CHECK_ID = 3 then
begin
MyPage: = frxReport1.FindComponent (' Page4 ') as TfrxPage;
MyPage. Visible: = True;
frxReport1.PrintOptions. ShowDialog: = False;
frxReport1.PrepareReport;
frxReport1.Print;
end;
end;
end;

2

Re: In FastReport to hide a component memo!

By the way sheets disappear, and in from  are not present!

var
MyPage: TfrxPage;
begin
MyPage: = frxReport1.FindComponent (' Page11 ') as TfrxPage;
MyPage. Visible: = False;
end;

3

Re: In FastReport to hide a component memo!

Askat;
on each field on Child and to hide Child, instead of Memo (at everyone Child it is necessary to deliver PrintChildifInvisible in True):
if <Tablitsa1. "2"> =0 then
Child2.Visible: = false;
if <Tablitsa1. "4"> =0 then
Child4.Visible: = false;

4

Re: In FastReport to hide a component memo!

Askat wrote:

by the way sheets disappear, and in from  are not present!

So you also do not hide them, deliver MyMemo. Visible: = False; after everyone MyMemo: = frxReport1.FindComponent (' Memo *** ') as TfrxMemoView;

5

Re: In FastReport to hide a component memo!

Amiri wrote:

Askat;
on each field on Child and to hide Child, instead of Memo (at everyone Child it is necessary to deliver PrintChildifInvisible in True):
What for child where it to look?

6

Re: In FastReport to hide a component memo!

Bali wrote:

it is passed...
So you also do not hide them, deliver MyMemo. Visible: = False; after everyone MyMemo: = frxReport1.FindComponent (' Memo *** ') as TfrxMemoView;

The super! Worked. !!!

7

Re: In FastReport to hide a component memo!

Bali wrote:

So you also do not hide them, deliver MyMemo. Visible: = False; after everyone MyMemo: = frxReport1.FindComponent (' Memo *** ') as TfrxMemoView;

Well why? The HARDWARE fairly hid last found, practically solved the task " memo does not disappear" smile)

8

Re: In FastReport to hide a component memo!

Horror!!!
Why not to write so?

procedure ShowMemos (Arr: array of string; V: boolean);
var i: integer;
M: TfrxMemoView;
begin
for i: = 0 to High (Arr) do begin
M: = frxReport1.FindComponent (Arr [i]) as TfrxMemoView;
if Assigned (M) then M.Visible: = V;
end;
end;
.........
ShowMemos ([' Memo566 ', ' Memo567 ', ' Memo568 '.....], odsChecksCOMMUNAL_SIGN.Value = 0);

Posts [ 8 ]

Pages 1

You must login or register to post a reply