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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Adding the SSRS report controller class in BatchTask

(0) ShareShare
ReportReport
Posted on by 931

Hi All,

I want to use the extended standard class WHSWorkControllerExt class as a batch task in my batch job. I have decorated with the class using the attribute [SysOperationJournaledParametersAttribute(true) but i am getting the below error.

'report name is not set. please set report name using parmreportname method". 

Please refer the code and suggest me how to solve this issue.

Thanks in advance.

/// 
/// This class is used for customizing the standard work report with the new design.
/// 
[SysOperationJournaledParametersAttribute(true)]
public class WHSWorkControllerExt extends WHSWorkController
{
    public static WHSWorkControllerExt construct()
    {
        return new WHSWorkControllerExt();
    }

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

        controller.parmReportName(ssrsReportStr(WHSWorkExt, Report));
        controller.parmArgs(_args);
        controller.startOperation();
    }

    /// 
    ///
    /// 
    protected void preRunModifyContract()
    {
        this.parmReportContract().parmReportName(ssrsReportStr(WHSWorkExt, Report));
        super();
    }

}

I have the same question (0)
  • Blue Wang Profile Picture
    on at

    Hi Rusty,

    In main(), you should add,

    Controller.parmExecutionMode(SysOperationExecutionMode::ReliableAsynchronous);

    and in your preRunmodifyContract().

    this.parmClassName(ClassStr(WHSWorkControllerExtDataService));
    
    this.parmMethodName(MethodStr(WHSWorkControllerExtDataService, process));

  • ThivaKar Profile Picture
    931 on at

    Thanks for your reply Blue wang. I will check this and get back to you.

  • ThivaKar Profile Picture
    931 on at

    Thanks for your reply Blue wang. I will check this and get back to you.

  • ThivaKar Profile Picture
    931 on at

    There are no methods called  parmClassName() and parmMethodName(). Can you help me out on this?

  • Blue Wang Profile Picture
    on at

    Hi Rusty,

    WHSWorkController extends SrsReportRunController.

    Controller class extends from the SysOperationServiceController class. It holds information about the batch operation.

    Then you can use it.

    461188.PNG

    https://msdax.wordpress.com/2016/06/03/sys-operation-framework-adding-class-to-batch-taskmaking-journalized/

  • ThivaKar Profile Picture
    931 on at
    [quote user="Blue Wang"]Controller class extends from the SysOperationServiceController class. It holds information about the batch operation.[/quote]

    No. Controller class extends from SysOperationController not SysOperationServiceController .

    Please LMK if i am missing anything.

  • Blue Wang Profile Picture
    on at

    Hi Rusty,

    I mean use this:

    public class WHSWorkControllerExt extends SysOperationServiceController
    {
    }

  • Ludwig Reinhard Profile Picture
    Microsoft Employee on at

    Hello RustyRyan,

    Is this issue related to D365FO or to AX2012?

    Best regards,

    Ludwig

  • ThivaKar Profile Picture
    931 on at

    Related to D365FO, Ludwig.

  • Blue Wang Profile Picture
    on at

    HI Rusty,

    Have you tried extends SysOperationServiceController ?

    Got any error?

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

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

#1
Martin Dráb Profile Picture

Martin Dráb 551 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 450 Super User 2025 Season 2

#3
BillurSamdancioglu Profile Picture

BillurSamdancioglu 278 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans