lundi 7 février 2011

How to build a section in a report using X++

In the Init method of your report Write this code:

public void init()
{
    ReportSection           reportSection;
    DictTable               dictTable;
    Counter                 fieldCounter;

    super();

    reportSection = element.design().autoDesignSpecs().addSection(ReportBlockType::Body);
    reportSection.table(tableNum(custTable));

    dictTable = new DictTable(tableNum(custTable));

    while (fieldCounter < 10)
    {
        fieldCounter++;
        reportSection.addControl(dictTable.id(), dictTable.fieldCnt2Id(fieldCounter));
    }
}
This code displays the required fields from the query without having a design in your report.

Happy Daxing!

Aucun commentaire:

Enregistrer un commentaire