How to define a group programmatically (at run time)
Hello,
I have a report which I define and customize programmatically at run time,
and I would like to add a group in this same manner. Of course, adding a
group at design time is straightforward, but I'm not sure how to do it at
run time. For instance, I can create an instance of TppGroup, but how do I
tell it which field to break on? (The Fieldname property is apparently
read-only).
Thanks in advance for any suggestions you might have!
Jason
I have a report which I define and customize programmatically at run time,
and I would like to add a group in this same manner. Of course, adding a
group at design time is straightforward, but I'm not sure how to do it at
run time. For instance, I can create an instance of TppGroup, but how do I
tell it which field to break on? (The Fieldname property is apparently
read-only).
Thanks in advance for any suggestions you might have!
Jason
This discussion has been closed.
Comments
With TppGroup.Create(Nil) Do
Begin
BreakName := GrpFieldName; {The database field name on which to
break...}
BreakType := btDataField;
KeepTogether := True;
Report := MyReport; {The report}
Name := 'MyTestGroup';
DataPipeline := MyReport.DataPipeline; {The report's datapipeline...}
End;
The "BreakName" property is the fieldname on which the report will break.
HTH,
Vikram