Free Text Invoice field to add to DSP/DDSP: Label: Customer requisition, Field: PurchOrderFormNum, Table: CustInvoiceTable

Hello community,

Has anyone tried to get the Free Text Invoice field Label: Customer requisition, Field: PurchOrderFormNum, Table: CustInvoiceTable added to their DSP / DDSP for form design?

EDIT: I should add: I was thinking since this is what I think is a default field in the [Application Foundation] module package - I think? - that it would be included in the DSP / DDSP. But I’m wondering:

Thanks again!
P.S.: I’m still working on it… and if and when I figure this out, I’ll try to summarize it here.


As you may have already know, Docentric takes the data prepared by the SSRS pipeline. If the field is not present in SSRS then it will not be available in the data-source. This means that you will have to add it as an additional field.

It is great to see you are overcoming challenges in your customizations. Keep up the good work!

Hello Semir,
Thanks for the comment.
Right now I have it to the point where the data should be available to the SSRS report, but Visual Studio compiler is giving me a some errors. I solved a few by finding something that was out of place that was automatically created somehow along the way. But I still have one error remaining.
Hopefully I can solve it and figure out this pattern of work.

  • Jim

Hello Jim,

You can add this or any other field you want by declaring a table buffer, doing a select statement and specifying the correct where clauses to get the related table you need.
Then you just add the field by using the addCalculatedField() method.

For this specific case, it is even easier to add, since there is a method defined to get the related custInvoiceTable inside the DocFreeTextInvoiceReportDSP class.
So you just need to add the following line to your extension:

_addingRecord.addCalculatedField('PurchOrderFormNum', this.custInvoiceTable().PurchOrderFormNum, 'Customer requisition');
1 Like

Hello Nanad,

Are you saying I don’t need to do all this other development work of:

  • FreeTextInvoiceHeaderFooterTmp.Extension table: Added new field WWIPurchOrderFormNum
  • WWIFreeTextInvoiceDP_Extension class: Added assignment of
    freeTextInvoiceHeaderFooterTmp1.WWIPurchOrderFormNum = _custInvoiceJour.custInvoiceTable().PurchOrderFormNum;
  • Rebuild above solutions and hope for no build errors (I currently have a build error that is proving difficult to solve)

and then move on to adding the
_addingRecord.addCalculatedField(‘PurchOrderFormNum’, this.custInvoiceTable().PurchOrderFormNum, ‘Customer requisition’);

to the custom class inheritance I have of WWIFreeTextInvoiceReportDSP which has these three methods:

Hi Jim,

That’s the best part of using Docentric, you don’t need to add any data to the SSRS pipeline (extending the tmp table and data provider), you can just add it directly to the Docentric pipeline by extending the DSP class.

The line I’ve mentioned should be all that is needed to add this field, since the method custInvoiceTable() already returns the relevant custInvoiceTable.

You can just add that line right below your call to super() in your extension of the addDataFieldsForHeader() method, in your WWIFreeTextInvoiceReportDSP class.

1 Like

Hello Nenad,

Hm. I’ll give it a try. I’ll remove the previous work I quoted above and try as you suggest. Is there a simple Docentric page that talks about this?

EDIT: Is this the related youtube video that shows how to do this? This one is 5 yr old and AX looks very different, is there an updated version of this that I can find on your YouTube channel?

I’ll report back with my progress.

Hi Jim,

There’s a blog article on the topic of creating a new custom report using Docentric, which has a chapter that uses the addCalculatedField() to add data from a table buffer.
Here’s the link to the article, the code in question is under “Step 3: Create a custom DSP class”.

In regards to the video you’ve found, AX may have changed, but the only thing that changed regarding the code you need to type is that the editor is now Visual Studio and not MorphX.


Hello again Nenad,

New day, new progress report.

I have the PurchOrderFormNum (UI Label ‘Customer Ref’ in the Free Text Invoice, Header, Customer Fast Tab) coming through to my DDSP now! And there was much rejoicing (Monty python…). Genius! Fabulous! Marvelous!

Thanks again. I’ll review that page linked to in your last reply as well.

  • Jim