Re:QuickReport and QRGroup Expression
On Fri, 9 May 2003 10:16:17 +0200, "Arianna"
Quote
<arianna...@actionlabs.it> wrote:
>Hi,
>I print with QuickReport from dynamic array.
>I use a band Groupheader but I don't succeed to assigne the Expression for
>print the Group header when a variable change.
>I 've used always Expression with fields of database.
>I try to create a variable and assigne them to expression, but without
>results.
>How can I do this?
>Thank you very much.
>Arianna
The following is a reply by Chris Wissembourg to an earlier question
on the same subject. I have not tried it myself but I believe Chris
used to work for QR:
Hi Anders,
Yes it is. But very few know how to.
Do the following.
declare a type
TQREvElementString1 = class(TQREvElementFunction)
public
function calculate: TQREvResult; override;
end;
and a variable
var
Group1rupture: string;
and a method
function TQREvElementString1.calculate: TQREvResult;
begin
result.kind := resstring;
result.strresult := Group1Rupture;
end;
then register the QR function
if QRFunctionLibrary.GetFunction('GROUP1RUPTURE') is TQRevElementError
then
RegisterQRFunction(TQREvElementString1, 'GROUP1RUPTURE',
'GROUP1RUPTURE|', 'GROUP1RUPTURE', '0');
if you register the function in the initialisation section of an unit
make
sure delphi uses your unit AFTER quickreport units.
now set the expression property of the QRgroup to GROUP1RUPTURE
you just have to change the value of the GROUP1RUPTURE variable to
make the
report break.
Thats all
Chris
"Anders Sundberg" <sum...@tripnet.se> a crit dans le message news:
3aae2ca9_1@dnews...
Quote
> Hi!
> Is it possible to get TQRGroup to break when there's no data base sources
> involved and all data is provided in OnNeedData?
> /Anders Sundberg