Board index » delphi » QR and group expression

QR and group expression

How can I dynamically change the group expression (in code or another way).
If I add groups to my report they don't show up
as objects in the code and therefore I can't change the properties at
runtime.

Using QuickReport 3.09 and Delphi 6 Proffessional.

Kjell-?ke Boberg

 

Re:QR and group expression


How are you creating the group? This should not be a problem. Have you
tried to change your group object's Expression during runtime?

Morten

Quote
Kjell-?ke Boberg wrote:
> How can I dynamically change the group expression (in code or another way).
> If I add groups to my report they don't show up
> as objects in the code and therefore I can't change the properties at
> runtime.

> Using QuickReport 3.09 and Delphi 6 Proffessional.

> Kjell-?ke Boberg

Re:QR and group expression


What I mean is when I'm designing a report with group bands everything
is working fine in design mode.

When I'm looking in the source code and trying to access the group band
there is no group band there. In fact there are no group bands at all (
my report have three group bands).

If you don't have the same problem it might be a bug in the version of
QR that I use.

However i solved the problem by linking the group band to another band
in design time. Then i get a handle to the group band by the following
code :

Group1 := TQRGRoup(QRBand1.LinkBand);

Then I can operate on the Group1 variable and dynamically change the
expression string.

Thanks for your help

Kjell-?ke

Quote
Morten wrote:
> How are you creating the group? This should not be a problem. Have you
> tried to change your group object's Expression during runtime?

> Morten

> Kjell-?ke Boberg wrote:

>> How can I dynamically change the group expression (in code or another
>> way).
>> If I add groups to my report they don't show up
>> as objects in the code and therefore I can't change the properties at
>> runtime.

>> Using QuickReport 3.09 and Delphi 6 Proffessional.

>> Kjell-?ke Boberg

Re:QR and group expression


I would put them in a TList instead of linking them to a band. Using LinkBand will limit you to only one group per band, unless that's what you need.

Morten

Quote
=?ISO-8859-1?Q?Kjell=2D=C5ke?= Boberg <k...@prowill.se> wrote:
>What I mean is when I'm designing a report with group bands everything
>is working fine in design mode.

>When I'm looking in the source code and trying to access the group band
>there is no group band there. In fact there are no group bands at all (
>my report have three group bands).

>If you don't have the same problem it might be a bug in the version of
>QR that I use.

>However i solved the problem by linking the group band to another band
>in design time. Then i get a handle to the group band by the following
>code :

>Group1 := TQRGRoup(QRBand1.LinkBand);

>Then I can operate on the Group1 variable and dynamically change the
>expression string.

>Thanks for your help

>Kjell-?ke

Other Threads