how do I hide all the shape ?
Hi
how do I hide all the components ( for example all SHAPE ) of main report
without having to write the name of putting them all to visible false?
All code in Rap.
like this code :
for x := 0 to report.component.count-1 do
begin
if report.component[X].classname = 'SHAPE' then
report.component[X].Visible := False;
end;
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5007 (20100407) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
how do I hide all the components ( for example all SHAPE ) of main report
without having to write the name of putting them all to visible false?
All code in Rap.
like this code :
for x := 0 to report.component.count-1 do
begin
if report.component[X].classname = 'SHAPE' then
report.component[X].Visible := False;
end;
__________ Information from ESET NOD32 Antivirus, version of virus signature database 5007 (20100407) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
This discussion has been closed.
Comments
You need to create a report object loop. Something like the following
inside the Report.BeforePrint would work...
var
liBand: Integer;
liObject: Integer;
lObject: TppComponent;
begin
for liBand := 0 to Report.BandCount-1 do
begin
for liObject := 0 to Report.Bands[liBand].ObjectCount-1 do
begin
lObject := Report.Bands[liBand].Objects[liObject];
if (lObject is TppShape) then
lObject.Visible := False;
end;
end;
end;
http://www.digital-metaphors.com/rbWiki/Delphi_Code/Layouts/Report_Object_Loop
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com