0

I need some help here. I created a custom report invoice design for PSAProjInvoice. I did duplicate PSAProjInvoice and worked on a already made design. Created a Controller and PrintMgmtDocTypeHandler class. Created outputitem extension and redirected it to my ProjInvoiceController

In axapta in ProjFormletterParameters form parameters it shows me name of my custom report but when I go to project invoices and try to make a look at the invoice I just get a error: Unable to find the report design PSAProjInvoiceSZM.ReportPL.

class PSAProjInvoiceSZM
{
[PostHandlerFor(classStr(PSAProjAndContractInvoiceController), 
staticMethodStr(PSAProjAndContractInvoiceController, construct))]
public static void ReportNamePostHandler(XppPrePostArgs arguments)
{
    PSAProjAndContractInvoiceController controller = arguments.getReturnValue();
    controller.parmReportName(ssrsreportstr(PSAprojinvoiceSZM, Report));
}

}

I think that it's a problem with my controller class because I actually have no idea how it should look like. Tried to make one based on salesinvoice tutorial found on microsoft docs but it didn't help me at all. Tried to make it based on this article: https://blogs.msdn.microsoft.com/dynamicsaxbi/2017/01/01/how-to-custom-designs-for-business-docs/

My Controller:

class ProjInvoiceControllerSZM extends PSAProjAndContractInvoiceController
{

public static ProjInvoiceControllerSZM construct()
{
    return new ProjInvoiceControllerSZM();
}

public static void main(Args _args)
{
    SrsReportRunController   formLetterController = 
ProjInvoiceControllerSZM::construct();
      ProjInvoiceControllerSZM controller = formLetterController;

    controller.initArgs(_args);

    Controller.parmReportName(ssrsReportStr(PSAProjInvoiceSZM, Report));

   /* if (classIdGet(_args.caller()) == 
classNum(PurchPurchOrderJournalPrint))
    {
        formLetterController.renderingCompleted += 
eventhandler(PurchPurchOrderJournalPrint::renderingCompleted);
    }*/

    formLetterController.startOperation();
}

protected void outputReport()
{
    SRSCatalogItemName  reportDesign;
    reportDesign = ssrsReportStr(PSAProjInvoiceSZM,Report);
    this.parmReportName(reportDesign);
    this.parmReportContract().parmReportName(reportDesign);
  formletterReport.parmReportRun().settingDetail().parmReportFormatName(reportDesign);
    super();
}

}
Tweene
  • 257
  • 4
  • 16
  • The code in your question does not seem to follow the linked tutorial. Have you tried following the tutorial? In step 7, it has the code (admittedly badly formatted) how the controller class should look like. – FH-Inway May 08 '20 at 08:46
  • The sample was not from controller. Now I added the controller code – Tweene May 08 '20 at 09:00
  • Thanks. Have you tried debugging where the error message is created? Did you do step 9 of the tutorial? – FH-Inway May 08 '20 at 20:41

0 Answers0