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

Community site session details

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

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

(1) ShareShare
ReportReport
Posted on by 454
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:
I have the same question (0)
  • Verified answer
    CU09091357-0 Profile Picture
    454 on at
    Object reference not set to an instance of an object when restore a dataset in ssrs report
    It worked just by restarting VS, the error disappeared and I was able to restore the dataset.
    Usual visual studio things :)

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…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

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

#1
Sohaib Cheema Profile Picture

Sohaib Cheema 756 User Group Leader

#2
André Arnaud de Calavon Profile Picture

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

#3
Martin Dráb Profile Picture

Martin Dráb 514 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans