ReportSection.addDateControl(Int32, Int32) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a date control to a report section.
public:
virtual Dynamics::AX::Application::ReportDateControl ^ addDateControl(int _tableId, int _fieldId);
public virtual Dynamics.AX.Application.ReportDateControl addDateControl (int _tableId, int _fieldId);
abstract member addDateControl : int * int -> Dynamics.AX.Application.ReportDateControl
override this.addDateControl : int * int -> Dynamics.AX.Application.ReportDateControl
Public Overridable Function addDateControl (_tableId As Integer, _fieldId As Integer) As ReportDateControl
Parameters
- _tableId
- Int32
The field ID.
- _fieldId
- Int32
The field ID.
Returns
The date control that is created.
Remarks
The following example demonstrates the addDateControl method.
static void test(args a)
{
reportRun rr;
inventTrans rec;
int i;
// Create a simple report that is not present in
// the Application Object Tree.
report r = new report();
reportDesign rd = r.addDesign("myDesign");
reportSection rs = rd.AddSection(reportBlockType::body,
tablenum(inventTrans));
int t = tablenum(inventTrans);
int f;
f = fieldnum(inventTrans, datePhysical);
rs.addDateControl(t,f);
// run the report
rr = new reportRun(r);
// Run the sysPrintForm form.
if (rr.prompt())
{
while select rec
rr.send(rec);
// Print report to the target (e.g. printer or screen) selected during the
// prompt call above.
rr.print();
}
}