Nello suggested
>
> function GetMyLabel(Index:Integer): TQRLabel;
> property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default;
These two under Public Declarations?
> function GetMyLabel(Index:Integer): TQRLabel;
> property MyLabels[Index: Integer]: TQRLabel read GetMyLabel; default;
These two under Public Declarations?
>
> function GetMyLabel(Index:Integer):TQRLabel;
> begin
> // in production probably should do some error checking ...
> return FindComponent(format('mylabel_%d',[Index]);
> end;
> begin
> // in production probably should do some error checking ...
> return FindComponent(format('mylabel_%d',[Index]);
> end;
This under Implementation
Should it be "result :=
MyLabels.FindComponent ...etc"?
I get error "Undeclared identifier -
MyLabels"
If I leave MyLabels out I get error
Undeclared identifier - FindComponent.
I can see how FindComponent would work -
I'm just tripped up on the declaration details, I think.
Thanks for coming up with this "shameless
hack"! It will make the report a lot less clunky.
Mark
>
>
> Now you can do stuff like
>
> for i:=0 until 9 do mylabels[i].caption:='foo';
>
>
> i'm making this up as i write this so caveat emptor - it
> may not even compile, and i certainly haven't tested it.
>
> -Ns
>
>
>
> ----- Original Message -----
> From: "Mark Howard" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list delphi" <[EMAIL PROTECTED]>
> Sent: Friday, October 12, 2001 2:08 AM
> Subject: [DUG]: Array of labels in QR
>
>
> Hi
> Is it possible to use an array of QRLabels in a Quick Report?
>
> If so,
>
> Is it possible to to create and place these at design time?
>
> and the next question (design time or run time) would be
>
> "How"?
>
> TIA
>
> Mark
>
>
>
>
>
>
> ---------------------------------------------------------------------------
> New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
> Website: http://www.delphi.org.nz
> To UnSub, send email to: [EMAIL PROTECTED]
> with body of "unsubscribe delphi"
> Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>