**There needs to be some heavy considerations on taking a second look at the integrity of your reporting product. **
Working on a report pulling data from SQL server, spend two hours prepping and finalizing the report. Saved often, previewed, exported my results and got it exactly where it needed to be. I then hit the automation button to begin completing that process. Included Toad Report under Database Activities for my first report export, which exports report results to an excel file. That part works fine. Added a second Toad Report action and set this one to export an html file that would then be embedded in to my Email action body. Save my automation and run. It craps out on the second Toad Report action. Returns the error: “Object reference not set to an instance of an object.” I attempt to troubleshoot and open the report and it now returns the error “This report is specific to the Sql Server platform and cannot be run using the current connection.” Keep in my mind, I haven’t physically changed my connection at any point. Every activity in this process ties back to my NOC_Reporting connection. I can’t even edit this report at this point.
Since I can’t physically open this report now in TDP, after spending hours developing, I attempted to open the tdr file in Visual Studio along with the first report in the automation to see if anything stood out. Low and behold, the connection string in the msprop:Connection="" syntax was completely wiped out in the broken report. So I attempted to copy the string from the report that worked and paste it in to the one that broke and no luck. I can’t seem to salvage my work and needless to say I’m pretty frustrated.
Here’s is the data from my log file. I’ve x’d out sensitive info.
– 2/18/2016 12:25:59 AM: TimeToKnow_PrevDay.log: Setting up environment
– 2/18/2016 12:25:59 AM: TimeToKnow_PrevDay.log: Script run by Toad Data Point 3.6.0.3276
– 2/18/2016 12:25:59 AM: TimeToKnow_PrevDay.log: Build started
– 2/18/2016 12:25:59 AM: TimeToKnow_PrevDay.log: Compiling script
– 2/18/2016 12:25:59 AM: TimeToKnow_PrevDay.log: Start CompileWorkflow
– 2/18/2016 12:25:59 AM: TimeToKnow_PrevDay.log: Before Compile
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Return from CompileWorkflow
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Wokrflow Compiled without Errors
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Build completed
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Create Workflow instance
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Started workflow instance
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Begin execution script activities
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Started generating report
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Connection description = XXX.XX.XXX.X (XXXX), NOC_Reporting
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Connection node found
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Connection to: NOC_Reporting
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Connection successful
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Connection logon: XXXX
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Last schema: NOC_Reporting
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Default schema: NOC_Reporting
– 2/18/2016 12:26:01 AM: TimeToKnow_PrevDay.log: Auto Commit: True
– 2/18/2016 12:26:08 AM: TimeToKnow_PrevDay.log: Row count set to 24 rows
– 2/18/2016 12:26:08 AM: TimeToKnow_PrevDay.log: Exporting to X:\XXX\TimeToKnow_PrevDay_Detail_2016-02-18.xlsx
– 2/18/2016 12:26:08 AM: TimeToKnow_PrevDay.log: Report Finished, click TimeToKnow_PrevDay_Detail_2016-02-18.xlsx to view file.
– 2/18/2016 12:26:08 AM: TimeToKnow_PrevDay.log: Started generating report
– 2/18/2016 12:26:08 AM: TimeToKnow_PrevDay.log: Opening Cross-Query connection
– 2/18/2016 12:26:09 AM: TimeToKnow_PrevDay.log: Report_2 - Object reference not set to an instance of an object.
– 2/18/2016 12:26:09 AM: TimeToKnow_PrevDay.log: Start error email
– 2/18/2016 12:26:09 AM: TimeToKnow_PrevDay.log: Email To: xxx@xxx.com, From: xxx@xxx.com, cc:
– 2/18/2016 12:26:09 AM: TimeToKnow_PrevDay.log: Email Subject: Automation Script Error
– 2/18/2016 12:26:09 AM: TimeToKnow_PrevDay.log: Generating exception Email
– 2/18/2016 12:26:09 AM: TimeToKnow_PrevDay.log: Email message:
Automation script “TimeToKnow_PrevDay” had errors while executing. The exception messages are listed below and the log file is attached.
Exception Messages:
Report_2 - Object reference not set to an instance of an object.
What I don’t understand is why, if both reports were initially built utilizing the same connection (NOC_Reporting), the second report attempts to open a cross-query connection (highlighted above).