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

Invalid Typecast

edited October 2008 in General
I thought that I had this problem solved but I was wrong. I have the
following code:

begin
for i := 0 to TheForm.ComponentCount - 1 do
if ( TheForm.Components[i] is TppDBText ) then
(TheForm.Components[i] as TppDBText).TextAlignment :=
taRightJustified;
end;

I get an invalid typecast error on the line:

(TheForm.Components[i] as TppDBText).TextAlignment := taRightJustified;

I using Delphi 6, ReportBuilder 10.09, Windows Vista Ultimate.

Comments

This discussion has been closed.