Toggle navigation
ReportBuilder Support Forums
Categories
Discussions
Activity
Sign In
Home
›
General
ReportBuilder 22.06 now available including Delphi 12.2 support!
New Blog Posts: Merging Reports -
Part 1
and
Part 2
Creating Groups Dinamically
rbuser
May 2003
edited May 2003
in
General
Hi, I'm using RBuilder with Delphi6, and I coudn't find out how to create
Groups in my report via code, dinamically, any tutorial or idea will help
me.
Thanks, Bruno M. Long
Comments
nicocizik
May 2003
edited May 2003
Hi Bruno,
This, along with many other helpful articles, is located in the
digital-metaphors.public.reportbuilder.tech-tips newsgroup.
----------------------------------------------------
Tech Tip: Creating a Group in Code
----------------------------------------------------
How can I dynamically create a report group at run-time?
example code:
-------------
uses
ppClass, ppGroup, ppClasUt;
function AddGroupToReport(aBreakName: String; aDataPipeline:
TppDataPipeline; aReport: TppCustomReport);
var
lGroup: TppGroup;
lGroupBand: TppGroupBand;
begin
{add group to report}
lGroup := TppGroup(ppComponentCreate(aReport, TppGroup));
lGroup.Report := aReport;
lGroup.BreakName := aBreakName;
lGroup.DataPipeline := aDataPipeline;
{add group header and footer bands }
lGroupBand := TppGroupBand(ppComponentCreate(aReport,
TppGroupHeaderBand));
lGroupBand.Group := lGroup;
lGroupBand := TppGroupBand(ppComponentCreate(aReport,
TppGroupFooterBand));
lGroupBand.Group := lGroup;
end; {procedure, AddGroupToReport}
--
Best Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
rbuser
May 2003
edited May 2003
It Worked OK, Thanks.
This discussion has been closed.
Comments
This, along with many other helpful articles, is located in the
digital-metaphors.public.reportbuilder.tech-tips newsgroup.
----------------------------------------------------
Tech Tip: Creating a Group in Code
----------------------------------------------------
How can I dynamically create a report group at run-time?
example code:
-------------
uses
ppClass, ppGroup, ppClasUt;
function AddGroupToReport(aBreakName: String; aDataPipeline:
TppDataPipeline; aReport: TppCustomReport);
var
lGroup: TppGroup;
lGroupBand: TppGroupBand;
begin
{add group to report}
lGroup := TppGroup(ppComponentCreate(aReport, TppGroup));
lGroup.Report := aReport;
lGroup.BreakName := aBreakName;
lGroup.DataPipeline := aDataPipeline;
{add group header and footer bands }
lGroupBand := TppGroupBand(ppComponentCreate(aReport,
TppGroupHeaderBand));
lGroupBand.Group := lGroup;
lGroupBand := TppGroupBand(ppComponentCreate(aReport,
TppGroupFooterBand));
lGroupBand.Group := lGroup;
end; {procedure, AddGroupToReport}
--
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com