web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Extend Base SSRS Report

(0) ShareShare
ReportReport
Posted on by 2
I try to extend the base print management report(PurchPurchaseOrder) But I got this error, I did three things 
1.Created extension for Tmp Table (PurchPurchaseOrder), and Duplicated the report (PurchPurchaseOrder)
2.Added the field(AntDlvMode) That I wanted, restored the data set in the report and edited the report 
3.atlast  wrote coding for COC Class and print management 
Anybody help me out 
Thanks
 
COC Class
[ExtensionOf(classStr(PurchPurchaseOrderDP))]
public final class Purch_Extension
{
    protected PurchPurchaseOrderTmp initializeOrderLine(
        PurchPurchaseOrderHeader _purchaseOrderHeader,
        boolean _highlightUpdated,
        PurchPurchaseOrderDPOrderLineQuerySelection _orderLineSelection)
    {
        PurchPurchaseOrderTmp purchPurchaseOrderTmp = next initializeOrderLine(_purchaseOrderHeader, _highlightUpdated, _orderLineSelection);
        PurchTable purchTable;
        select purchPurchaseOrderTmp;
        purchPurchaseOrderTmp.AntDlvMode = purchTable.DlvMode;
        purchPurchaseOrderTmp.insert();
        return purchPurchaseOrderTmp;
    }
}
 
Print management class Code
 
class MaxPrintMgtDocTypeHandlersExt{    [SubscribesTo(classstr(PrintMgmtDocType), delegatestr(PrintMgmtDocType, getDefaultReportFormatDelegate))]    public static void getDefaultReportFormatDelegate(PrintMgmtDocumentType _docType, EventHandlerResult _result)    {        switch (_docType)        {            case PrintMgmtDocumentType::CustAccountStatement:                _result.result(ssrsReportStr(MaxCustAccountStatementExt, Report));                break;        }    }}
 
 
Here some example images
////
 
Extende objects 
////
 
 
 
I have the same question (0)
  • Martin Dráb Profile Picture
    240,532 Most Valuable Professional on at
    Moved from Dynamics AX forum.
     
    The error suggests that you have a problem with SSRS in general. Are you sure that you can deploy other records?
     
    By the way, you have a bug in Purch_Extension class. The field purchTable.DlvMode will always be empty, because you forgot to assign a value purchTable variable. Because you take a values from the order header, the field belongs to PurchPurchaseOrderHeader table, not PurchPurchaseOrderTmp, and the right method to initialize it is PurchPurchaseOrderHeader.initFromPurchTableAllVersions().
  • Antony Profile Picture
    2 on at
    Thank you martin, Can you give me the code
  • Antony Profile Picture
    2 on at
  • Martin Dráb Profile Picture
    240,532 Most Valuable Professional on at
    I thought you want to discuss the problem with deployment, but you didn't answer my question and you aren't talking about it anymore. Does it mean that it's all right now?
     
    Regarding the code, I recommend you do what I suggested in my first reply. Please try it and if you run into a problem, please describe it here.
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    3,634 Moderator on at
    It seems the parameters in report got changed. Or this type of error comes when you have added new field in design which says cells are not matching like some sort of error.
     
    The work around here is to open the XML file of ssrs report and you need to edit the cells shown.
     
     
    Check the 2nd resolution in the link provided.
  • Antony Profile Picture
    2 on at
    Sorry Martin, Yeah I can deploy other reports and also There is a values in DlvMode

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 330 Most Valuable Professional

#2
CU10121822-0 Profile Picture

CU10121822-0 310

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 242 Super User 2026 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans