Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Finds an existing section group in the generated design.
Syntax
public ReportSectionGroup sectionGroup(TableId tableId, [FieldId fieldId])
Run On
Called
Parameters
- tableId
Type: TableId Extended Data Type
The table ID.
- fieldId
Type: FieldId Extended Data Type
The field ID; optional.
Return Value
Type: ReportSectionGroup Class
The specified section group.
Examples
static void test(args a)
{
reportRun rr;
inventTrans rec;
int i;
int t = tablenum(inventTrans);
int f = fieldnum(inventTrans, datePhysical);
// Create a simple report that is not present in
// the Application Object Tree.
report r = new report();
reportDesign rd = r.addDesign("myDesign");
reportSectionGroup rsg;
reportSection rs = rd.AddSection(reportBlockType::body, t);
rs.addControl(t,f);
rsg = rd.SectionGroup(t);
if (rsg)
{
rs = rsg.AddSection(ReportBlockType::Header);
// Run the report.
rs.AddTextControl("This is the groupHeader");
}
rr = new reportRun(r);
// Run the sysPrintForm form.
if (rr.prompt())
{
select rec;
rr.send(rec);
// Print report to the target, such as printer or screen.
rr.print();
}
}