English 中文(简体)
How to reference a report datasource table using x++
原标题:
  • 时间:2009-11-25 23:41:38
  •  标签:
  • axapta

I m unable to find the proper syntax for referencing the CustInvoiceTrans table of the SalesInvoice report datasource.

Here s the context: I ve created a new classification field on the InventItemGroup table and need to get the data from this field for each item on the invoice, and then summarize this data on the header of the invoice.

最佳回答

Look at method fetch() of the SalesInvoice report.

while (tradeLoopTrans.next())

{

   custInvoiceTrans = tradeLoopTrans.get(tablenum(CustInvoiceTrans));

   // ....

   this.send(custInvoiceTrans);

custInvoiceTrans is an each invoive line which will be printed in report.

Next look at Design, Section Group : CustInvoiceJour -> Section Group : CustInvoiceTrans. Here are all fields, which will be printed

So you need:

  • On the table CustInvoiceTrans create the display method:

    display str getClassification()
    {
       InventTable      table = InventTable::find(this.ItemId);
       InventItemGroup  grp = InventItemGroup::find(teble.ItemGroupId);
       ;
       return grp.new_field
    }
    

    This method return your classification for each CustInvoiceTrans.

  • On report design, on section Section Group : CustInvoiceTrans create a new field.
    DataSource = CustInvoiceTrans DataMethod = getClassification

问题回答

暂无回答




相关问题
Axapta: Programmatically switch records in a form

In Dynamics AX 2009, how do you programmatically change to a different record in a form? My form contains a treeview and a group of bound data fields. When clicking on a record in the tree (the data ...

Dynamics AX 2009 - Duplicate IDs

We are in the process of merging projects from different AX Servers into source control on the same AX server. However, a few object IDs are common between projects, so Dynamics throws an error when ...

How to show a row total amount by group CG Group in Report

I am using Axapta 3.0 with language X++. I am making a report based on available report. The new report only shows a total row by group CG Group instead of showing all detail row as old report. Exam:...

Axapta: Form lifecycle question

I am attempting to manually populate an image icon into a window nested in a grid. In the run event, the fields don t appear to have values yet. The string control always returns an empty value. Is ...

How to reference a report datasource table using x++

I m unable to find the proper syntax for referencing the CustInvoiceTrans table of the SalesInvoice report datasource. Here s the context: I ve created a new classification field on the ...

axapta thread / animation

i have a function which costs plenty of time. this function is an sql-query called via odbc - not written in x++, since the functional range is insufficient. while this operation is running, I want ...

Axapta Validation Class

I ve written a method to handle regex validation in AX2009. Problem is that it always returns false, no matter what the expression or input string. Returns no errors, just false Mind taking a ...

ERP What to read/practice?

I had been learning ERP applications this summer during internship. As I am a programmer about to graduate, I want to have a solid software branch that would get me through till I am sure about what ...

热门标签