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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Dynamics 365 Community / Forums / Finance forum / Unable to cast objectt...
Finance forum
Under review by Community Managers

Under review

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

Unable to cast objecttype 'Dynamics..SrsReportRdlDataContract' to 'Dynamics..TaxTransRdlContract

Posted on by
Hi everyone,
 
I'm trying to duplicate a class "TaxTransController", by copying all into new class. In one of the method"prePrompModifyContract" there is this :
 
protected void prePromptModifyContract()
    {
        #ISOCountryRegionCodes
        TaxTransRdlContract     contract;
        int                     displayVatDueDate = 1;
        this.parmDialogCaption("@SYS55726");
        if (TaxParameters::isEasternEuropeOrVatDueDateFeatureEnabled())
        {
            displayVatDueDate = 2;
            if (SysCountryRegionCode::isAnyLegalEntityInCountryRegion(#isoCZ))
            {
                displayVatDueDate = 3;
            }
        }
        contract = this.parmReportContract().parmRdlContract();
        contract.parmDisplayVatDueDate(displayVatDueDate);
    }
 
This class is to run a report which is also a duplication of the specified report in the original TaxTransController.
 
When run this through menu, I'm hitting this error ->
 
 
May I know what's wrong with this ? and how to fix it ?
Thanks

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard > Finance

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans