Change unit after new SubReport created
Hi,
Win XP, RB 7.01, Delphi 6.
In delphi unit, I create a dinamic SubReport and then I Change the unit of
the current report, and an error appear.
Here is my code:
var
MySubReport : TppSubReport;
Begin
MyDesigner.CurrentReport.Units := utScreenPixels;;
MySubReport := TppSubReport.Create(MyDesigner.Form);
MySubReport.Band := MyDesigner.CurrentReport.Bands[1];
MySubReport.Top := Y;
==> MyDesigner.CurrentReport.Units := utMillimeters; /* BUG -
eAccessViolation ... RbRCL76.bpl
End;
The same code with a dynamic creation of another component than subreport is
OK.
Thanks
Win XP, RB 7.01, Delphi 6.
In delphi unit, I create a dinamic SubReport and then I Change the unit of
the current report, and an error appear.
Here is my code:
var
MySubReport : TppSubReport;
Begin
MyDesigner.CurrentReport.Units := utScreenPixels;;
MySubReport := TppSubReport.Create(MyDesigner.Form);
MySubReport.Band := MyDesigner.CurrentReport.Bands[1];
MySubReport.Top := Y;
==> MyDesigner.CurrentReport.Units := utMillimeters; /* BUG -
eAccessViolation ... RbRCL76.bpl
End;
The same code with a dynamic creation of another component than subreport is
OK.
Thanks
This discussion has been closed.
Comments
dynamically. Can you reproduce the problem with this tip?
http://www.digital-metaphors.com/tips/DynamicSubreportCreation.zip
Test performed with:
Win 2K
RB 7.02 Build 2
Delphi 6 UP 2
Cheers,
Jim Bennett
Digital Metaphors
http://www.digital-metaphors.com
info@digital-metaphors.com
Sorry and thanks.