Editing AX 2012 SSRS Report – PurchPurchaseOrder

When modifying this report in Visual Studio 2010 the classes will throw all types of errors.

The first error that I got was explained here earlier today Next there was an error when refreshing the PurchPurchaseOrder Data source on the AX 2012 Reporting services Report. It stated that, “Element’;PurchPurchaseOrder.Parameters.IsPurchConfirmationRequestJournal’ has already been defined. To correct this, rename on or more of the model elements so that they have a unique name. Another developer already solved this issue so here is his fix: The second error was explained here The last error that I received was this:

Error 1 An exception occurred in the query metadata execution. 
The exception is Function PurchTableAllVersions.initFromProformaPurchTableVersion has been incorrectly called.
(S)\Classes\xInfo\add
(S)\Classes\Info\add - line 94
(S)\Classes\Global\error - line 3
(S)\Data Dictionary\Views\PurchTableAllVersions\Methods\initFromProformaPurchTableVersion - line 15
(S)\Classes\PurchPurchaseOrderDP\initProformaPurchTableAllVersions - line 9
(S)\Classes\PurchPurchaseOrderDP\retrieveJournalAndVersion - line 23
(S)\Classes\PurchPurchaseOrderDP\createData - line 30
(S)\Classes\PurchPurchaseOrderDP\processReport - line 52
(S)\Classes\SrsReportRunRdpPreProcessStrategy\execute - line 27
(S)\Classes\SrsReportRunRdpPreProcessService\executeWithContract - line 82
(S)\Classes\SrsReportProviderQueryBuilder\runPreviewModePreProcessedRdp - line 29
(S)\Classes\SrsReportProviderQueryBuilder\initialize - line 58
(S)\Jobs\. PurchPurchaseOrder.Report [Preview] 0 0 

These errors are related to the fact that we can’t run some reports in Visual Studio to see results especially if there are args that come from the AX UI. You can ignore these errors. When the report is run from the form it works perfectly.

Could not find [class].[method] in the method map. Will attempt to use X++ delagates.

While working on the AX 2012 R2 SSRS PurchPurchaseOrder, I was getting a lot of errors on a standard report. I ran a Generate Full CIL and got these results:

Finished pass 1 at 9/10/2014 11:20:49 PM
Finished pass 2 at 9/10/2014 11:20:52 PM
Could not find SrsReportRunController.renderingCompleted in the method map. Will attempt to use X++ delegates.
Could not find SourceDocumentProcessorFacade.processedHeaderImplEventHandler in the method map. Will attempt to use X++ delegates.
Finished pass 3 at 9/10/2014 11:20:58 PM
Finished creating types at 9/10/2014 11:20:58 PM
Errors: 0
Warnings: 0

To fix this I went to the classes and compiled them.

  1. Right click the class.
  2. Choose compile.
  3. Right click class
  4. Choose Add-Ins
  5. Compile Forward

You can then run a Generate Full CIL without errors.