5
votes

I've created a new "Report Server Project" in VS2013 .Net 4.5. I've added a data source and the test connection succeeds. I've added a DataSet using the "Use a dataset embedded in my report" option choosing the data source previously created. The query type is Stored Procedure with a single text parameter. In the report data box I can right click my DataSet, choose Query, and execute the sproc. I see a grid populated correctly with my data.

However, when I try to create and preview a report it fails. I do the following:

  1. Add a new report.
  2. Drop a table on it from the toolbox.
  3. Start dragging fields from my DataSet onto the table.
  4. When I hit preview I see the following enter image description here

Here is the text that gets spit into the output window:

System.ServiceModel.CommunicationObjectFaultedException: The communication object, System.ServiceModel.Channels.ClientFramingDuplexSessionChannel, cannot be used for communication because it is in the Faulted state.

Server stack trace: at System.ServiceModel.Channels.CommunicationObject.ThrowIfDisposedOrNotOpen() at System.ServiceModel.Channels.OutputChannel.BeginSend(Message message, TimeSpan timeout, AsyncCallback callback, Object state) at System.ServiceModel.Dispatcher.DuplexChannelBinder.BeginRequest(Message message, TimeSpan timeout, AsyncCallback callback, Object state) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartSend(Boolean completedSynchronously) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureOpen(IAsyncResult result, Boolean completedSynchronously) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureOpen(Boolean completedSynchronously) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.FinishEnsureInteractiveInit(IAsyncResult result, Boolean completedSynchronously) at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.StartEnsureInteractiveInit() at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.Begin() at System.ServiceModel.Channels.ServiceChannel.BeginCall(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, TimeSpan timeout, AsyncCallback callback, Object asyncState) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeBeginService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.ReportDesigner.Design.IPreviewProcessing.BeginSetItemPath(String itemPath, AsyncCallback callback, Object asyncState) at Microsoft.ReportDesigner.Design.PreviewProcessingClient.BeginSetItemPath(String itemPath, AsyncCallback callback, Object asyncState) at Microsoft.ReportDesigner.Design.WCFProcessingHost.<>c__DisplayClass1.b__0(AsyncCallback ac, Object s) at Microsoft.ReportDesigner.Design.WCFProcessingHost.<>c__DisplayClass3b.b__39() at Microsoft.ReportDesigner.Design.WCFProcessingHost.ExecuteWcfCall(Action wcfCall) at Microsoft.ReportDesigner.Design.WCFProcessingHost.ExecuteAsyncCall(Func`3 beginAction, AsyncCallback endAction) at Microsoft.ReportDesigner.Design.WCFProcessingHost.set_ItemContext(PreviewItemContext value) at Microsoft.Reporting.WinForms.LocalReport.ChangeReportDefinition(DefinitionSource updatingSourceType, Action changeAction) at Microsoft.Reporting.WinForms.LocalReport.set_ReportPath(String value) at Microsoft.ReportDesigner.Design.PreviewFrame.RefreshPreview()

I have googled for two days with no luck, any help is much appreciated.


EDIT: It turns out, when you preview the report, this console window opens. I must have closed it the first time, then the preview fails. If you leave the console window open the preview works fine. Here is a screenshot so you can see what I'm talking about. In order to get previewing to work, I just had to re-start visual studio and make sure not to close the console window when it pops up when I hit preview.

enter image description here

2
I answered my own question in the edited comment, hooray!BBauer42

2 Answers

4
votes

This is a reported bug in SSDT-BI. In the meantime the current workaround is to right click on the report you want to preview in your Solution Explorer and click RUN and it will work unless you want to keep that command prompt window open.

1
votes

Running the Microsoft Visual Studio as Administrator will resolve this issue.