Question Status

Verified
Aragon asked a question on 13 Jun 2013 7:45 PM

Hi guys,

I'm currently developing a customization on "PurchPurchaseOrder" report of MS AX 2012.

I need the report to display one or more data such as "Invoicing Address" of current company, "PurchaseType" of PO.... which are not included in the default report's data provider.

So, in AX, I created a new table named "MyPurchOrderHeader" to contain those data and included it in the data provider of "PurchPurchaseOrder" report.

In VS, I set the newly added table as a new dataset, add some fields to display those data, rebuilt the project, deloyed the customized report.

The problem is, the report show blank data when run on AX client.

For checking, I used the function "IsNothing()" on the newly added data fields' values, and strangely, the result is "true".

In development workspace, I already checked the "MyPurchOrderHeader" table, maked sure it has data and only 1 record.

I has been dealing with this problem for a couple days now, already tried restart SSRS and start customization from beginining again, but no luck.

If you guys faced a problem like this before, please show me how to do fix this.

Thanks in advandce.

Reply
Verified Answer
Aragon responded on 25 Jun 2013 8:17 PM

Hi guys,

The "adding-a-new-table" thing is a request from my customer.  They afraid that in the future, if there is a new upgrade from MS (ex: ax 2015), the upgrade will be in conflict with the customization. (I already explained to them about the layers in AX, but they just wanted to make sure.)

So, I know it's not a good practice but I still have to do it.

By the way, I got this fixed by adding the below code in the Data Provider class:

    myTable.setConnection(this.parmUserConnection());

with "my table" is the new table that I added.

I still don't know why the "setConnection(this.parmUserConnection())" function is needed in order that the report could run correctly. (will look further into it when I have time)

Recently, I'm kind of busy. Sorry for the late update.

Hope this help.And, thanks for your answers and suggestions.

Reply
Suggested Answer
Yasir Godil responded on 14 Jun 2013 3:10 AM

Make sure you have written the get method on DP class for this new table you have included in the report. By get method I mean something similar to the example shown below

[

   SRSReportDataSetAttribute(tableStr(PurchPackingSlipHeaderTmp))

]

public PurchPackingSlipHeaderTmp getPurchPackingSlipHeaderTmp()

{

   select purchPackingSlipHeaderTmp;

   return purchPackingSlipHeaderTmp;

}

Reply
Suggested Answer
benb331 responded on 14 Jun 2013 12:59 PM

When you're developing SSRS reports with RDP's, make sure to generate incremental CIL at minimum (preferrably Full CIL if you have time) between AOT changes and SSRS changes. After the CIL, refresh the SSRS report definition in VS.

Reply
Suggested Answer
Yasir Godil responded on 14 Jun 2013 3:10 AM

Make sure you have written the get method on DP class for this new table you have included in the report. By get method I mean something similar to the example shown below

[

   SRSReportDataSetAttribute(tableStr(PurchPackingSlipHeaderTmp))

]

public PurchPackingSlipHeaderTmp getPurchPackingSlipHeaderTmp()

{

   select purchPackingSlipHeaderTmp;

   return purchPackingSlipHeaderTmp;

}

Reply
Suggested Answer
benb331 responded on 14 Jun 2013 12:59 PM

When you're developing SSRS reports with RDP's, make sure to generate incremental CIL at minimum (preferrably Full CIL if you have time) between AOT changes and SSRS changes. After the CIL, refresh the SSRS report definition in VS.

Reply
venkatesh vadlamani responded on 15 Jun 2013 2:11 PM

I dont understand why is that you need to add a new table.

Please try adding a new address type field with you project name like ***_InvAddress on the existing table.

Refresh the dataset.  All you need to do is add this to the design some place where you want.

Now duplicating the table itself is not a good practice.

Reply
Verified Answer
Aragon responded on 25 Jun 2013 8:17 PM

Hi guys,

The "adding-a-new-table" thing is a request from my customer.  They afraid that in the future, if there is a new upgrade from MS (ex: ax 2015), the upgrade will be in conflict with the customization. (I already explained to them about the layers in AX, but they just wanted to make sure.)

So, I know it's not a good practice but I still have to do it.

By the way, I got this fixed by adding the below code in the Data Provider class:

    myTable.setConnection(this.parmUserConnection());

with "my table" is the new table that I added.

I still don't know why the "setConnection(this.parmUserConnection())" function is needed in order that the report could run correctly. (will look further into it when I have time)

Recently, I'm kind of busy. Sorry for the late update.

Hope this help.And, thanks for your answers and suggestions.

Reply