Report.addDesign Method
Creates a reportDesign that belongs to a report.
Syntax
public ReportDesign addDesign([str name, container buffer])
Run On
Called
Parameters
- name
Type: str
Sets the name of the reportDesign.
- buffer
Type: container
Lets the design have the contents given by buffer.
Return Value
Type: ReportDesign Class
The created reportDesign.
Remarks
The buffer argument can be a container created by the pack method.
Examples
This job demonstrates how addDesign can be used to generate a design that is a copy of another design.
static void demoAddDesign(args a)
{
report r1;
report r2;
reportDesign rd;
reportSection rs;
reportRun rr;
container c;
// Create a simple report r1.
r1 = new report();
rd = r1.addDesign("Design1");
rs = rd.addProgrammableSection(1);
rs.addTextControl("Hello world");
c = rd.Pack(); // make a container containing r1's design
// Create a report r2 having a design that is a copy of r1's design.
r2 = new report();
r2.AddDesign("design2", c);
// Run the report.
rr = new reportRun(r2, "design2");
// Run the sysPrintForm form.
if (rr.prompt())
{
// Execute the programableSection.
rr.execute(1);
// Print report to the target, such as printer or screen.
rr.print();
}
}