Skip to main content

Notifications

Dynamics 365 Community / Forums / Finance forum / Object reference not s...
Finance forum
Unanswered

Object reference not set to an instance of an object when restore a dataset in ssrs report

Posted on by 110
I have a SSRS report that i want to add a field (txt) in it, the field is in the main table (BankAccountStatement), and not in the tmp table, so i extended the tmp table and added a field of the same data type, then i created a class:
internal final class Ex_EventHandler
{
    [DataEventHandler(tableStr(BankAccountStatementTmp), DataEventType::Inserting)]
    public static void BankAccountStatementTmp_onInserting(Common sender, DataEventArgs e)
    {
        BankAccountStatementTmp BankAccountStatementTmp = sender as BankAccountStatementTmp;
        BankAccountTrans BankAccountTrans;
        while select Txt from BankAccountTrans where BankAccountTrans.AccountId == BankAccountStatementTmp.AccountID
        {
            BankAccountStatementTmp.Txt = BankAccountTrans.Txt;
        }
    }
}

When i want to restore the dataset in the report to let my new field (txt) to be available to add it to the design, it says to me that the "Object reference not set to an instance of an object" when restoring the dataset.
 
Adding that when I created a new dataset with the query, the field txt is showing, and I built my model with database synchronization.
 
My main and only goal is to add a new field to the design, that's it, why am I getting this error?
Categories:

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

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

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,888 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,247 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans