Hi All,
I would like to change the SalesPackingSlip report design a bit and thus in order to expand application suite report data set, I duplicated the existing report and changed the design and created the extension of a menu item and assign the extension of controller to it.
my code is as follows.
class SalesPackingSlipController_my extends SalesPackingSlipController
{
public static SalesPackingSlipController_my construct()
{
#ISOCountryRegionCodes
GlobalizationInstrumentationHelper::featureRunByCountryRegionCodes(
[ [#isoIT, GlobalizationConstants::FeatureReferenceIT00020] ],
funcName()
);
return new SalesPackingSlipController_my();
}
///
/// Initailzes the controller, sets the print management, assigns parameter values and runs the SRS report.
///
///
/// The Args object.
///
public static void main(Args _args)
{
SrsReportRunController formLetterController = SalesPackingSlipController_my::construct();
//
// print document set
if (TaxThaiGovCertificationFeatureChecker::isUnrealizedVATEnabled()
&& _args.parmEnum() != PrintCopyOriginal::OriginalPrint)
{
SalesPackingSlipController::printDocumentSet(_args);
}
else
{
//
SalesPackingSlipController_my controller = formLetterController;
controller.initArgs(_args, PrintMgmtDocType::construct(PrintMgmtDocumentType::SalesOrderPackingSlip).getDefaultReportFormat());
// redirect to my own report, SalePackingSlip_my
if (controller.reportName == ssrsReportStr(SalesPackingSlip, Report))
{
controller.parmReportName((ssrsReportStr(SalesPackingSlip_my, Report)));
}
if (classIdGet(_args.caller()) == classNum(SalesPackingSlipJournalPrint))
{
SalesPackingSlipController::subscribeToRenderingCompleted(formLetterController);
}
formLetterController.startOperation();
//
}
//
}
}
However, the report design is not updated at all. I guess the report design is overwritten after calling formLetterController.startOperation();
Where should I modify to redirect it to my own report?
Thank you.