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 :
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 596
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
    596 on at
    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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 617

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 461 Super User 2026 Season 1

#3
Syed Haris Shah Profile Picture

Syed Haris Shah 298 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans