Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Extend Base SSRS Report

(0) ShareShare
ReportReport
Posted on by 23
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 
////
 
 
 
  • Antony Profile Picture
    Antony 23 on at
    Extend Base SSRS Report
    Sorry Martin, Yeah I can deploy other reports and also There is a values in DlvMode
  • Suggested answer
    Bharani Preetham Peraka Profile Picture
    Bharani Preetham Pe... 3,613 Super User 2024 Season 1 on at
    Extend Base SSRS Report
    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.
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Extend Base SSRS Report
    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.
  • Antony Profile Picture
    Antony 23 on at
    Extend Base SSRS Report
  • Antony Profile Picture
    Antony 23 on at
    Extend Base SSRS Report
    Thank you martin, Can you give me the code
  • Martin Dráb Profile Picture
    Martin Dráb 230,445 Most Valuable Professional on at
    Extend Base SSRS Report
    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().

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Verified Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,391 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,445 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans