Reputation: 17
I would like to start by describing what I am trying to do. I am working in Dynamics NAV 2015 attempting to create a custom report layout using Microsoft SQL Server Report Builder. The way it works is I am in NAV, I choose a custom report, and then I click 'Edit Layout'. The Report Builder pops up on its own and allows me to start working.
The problem is that, even if I have a completely fresh report with nothing on it, I cannot preview the report. Instead I get the following error:
ExecuteReader: CommandText property has not been initialized
----------------------------
Query execution failed for dataset 'DataSet_Result'.
----------------------------
An error has occurred during report processing.
----------------------------
An error occurred during local report processing.
The strange thing is that if I do work and save it, then go back into NAV and print the report, it works fine. I just can't preview it while I'm working on it in the Report Builder.
Does anyone know why 'CommandText' would not be initialized automatically? Or where I would go to initialize it? I feel something may not be set up properly, but I can't find anything anywhere that has been helpful.
Upvotes: 1
Views: 1222
Reputation: 1217
Preview does not work in the Report Builder when editing a layout for Dynamics NAV. The dataset is not available to the report builder at the time of the design. These reports do not connect directly to SQL or Reporting Services.
You need to save and run the report through NAV so it can populate its dataset. There is a preview in the Report's request page.
I usually leave the report layout open > Save layout > Return focus to NAV > It will prompt to import the layout > Ctrl + S > Ctrl + R.
Upvotes: 2