Report.addDesign Method [AX 2012]
Creates a reportDesign that belongs to a report.
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();
}
}
Community Additions
ADD
Show: