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
How to create/change groups on a report at runtime
rbuser
October 2007
edited October 2007
in
General
Hi;
how can i change the fields that controls groups on my reporte or even
create new ones at runtime?
im using rbuilder 7.03 and D7 ent.
TIA
Comments
nicocizik
October 2007
edited October 2007
----------------------------------------------------
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}
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Best Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
This discussion has been closed.
Comments
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}
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com