Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Change unit after new SubReport created

edited April 2003 in End User
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

Comments

This discussion has been closed.