Partilhar via


An Error when attempting to Preview a Report using SQL Server Data Tools in a Remote Session

A customer with whom I work recently encountered an error message when attempting to preview a report using SQL Server Data Tools (SSDT) in a remote session via Citrix.

The error message that was being returned was:

 

An error prevented the view from loading. (Microsoft Visual Studio)

===================================

An error occurred while attempting to start the report preview worker process. (Microsoft.ReportingServices.Designer)

 

Given that this scenario worked with previous editions of Reporting Services and BI Development Studio, the error was unexpected.  On further investigation, the same behavior and error could be reproduced by launching a Remote Desktop session in Seamless or Remote Applications Integrated Locally (RAIL) mode.

RAIL extends the RDP protocol presents a remote application running on a RAIL server as a local user application running on the client machine. This causes the remote application to appear as if it is running on the user's local computer rather than being presented in the desktop of the remote Server.

In this scenario, the behavior and the error message are both by design.

SSDT is a multi-targeted assembly that is built around the .NET 4.0 Framework. Business Intelligence Development Studio (BIDS) is built around the .NET 3.5 Framework and there are differences in the way that the .NET 4.0 Framework deals with child processes when the parent process dies. As a result, there was a deliberate decision to change the behavior of the report viewer in preview mode. This is largely because under the .NET 4.0 Code Access Security policy, executing under the current AppDomain is no longer supported, necessitating use of a sandbox. You may wish to read Brian Hartman's blog posting "Expression Evaluation in Local Mode" for a more detailed discussion of Visual Studio 2010 defaulting to the .NET 4.0 CAS policy. The net result of the change is that when a report is previewed, SSDT spawns a child process to allow previewing of the report. In the RDP using Seamless or RAIL mode, it would still be necessary for SSDT to spin up a new instance of the Reporting Services Preview Processing Host (PreviewProcessingService.exe) separate from the SSDT process. In the event that the user were to close SSDT or SSDT were to crash, it would be possible for orphaned instances of the Reporting Services Preview Processing Host application to remain in memory and continue execution after SSDT was terminated.

The change makes it cleaner to close SSDT and eliminates the possibility of orphaned child processes in the event that the SSDT environment is terminated for some reason. Had the change not been made, it would have been possible to allow orphaned child applications/processes to continue to execute, using CPU cycles and consuming server memory, until the user logged off the machine. If the user didn’t log off and rather elected to simply disconnect without logging off, any orphaned applications would have remained in memory for an indefinite period of time. In the scenario where a machine is being remotely accessed by multiple users, that could potentially mean thousands of orphaned applications would be in memory and actively executing at any given time.

Comments

  • Anonymous
    August 15, 2013
    The comment has been removed

  • Anonymous
    October 22, 2013
    Have to agree with Tim on this one. We have to use the "runas" option to connect to our production SQL servers and this is going to give us fits trying to work around it. Good to know and I'll pass it on to our reporting team, but frustrating.

  • Anonymous
    November 08, 2013
    Same situation here. Due to security restrictions on a hosted SQL Server, we have to use VPN + runas to get into the design studio for report building.

  • Anonymous
    January 10, 2014
    There is a work around for this problem.  Right click on the report, then click "Run".  This will bring up the report in a seperate viewer.  Its hokey, and in 9 years of developing reports, I've never used the "Run" feature, but it works!

  • Anonymous
    May 25, 2014
    Hey Greenmtnsun! Thanks a lot for the valueable help! Saved my day (and I also do reports since 5 years, and NEVER ever clicked on that button before :-)) cheers, matt

  • Anonymous
    June 06, 2014
    Thanks Run really worked for me!!!!!

  • Anonymous
    July 14, 2014
    It's not acceptable. I get that window showing in the May 2014 build of SSDT-BI just running directly on my desktop; no remote desktop necessary. And then it won't go away until SSDT is closed.

  • Anonymous
    July 21, 2014
    Quick comment no the Run workaround.  If you are using SharePoint to host your RDL's and have the link set up in the project, Run will actually deploy first then open the SharePoint version.

  • Anonymous
    April 16, 2015
    Using the 'run as' and yes. this is now at total PITA.

  • Anonymous
    May 28, 2015
    Agree with Adam. MS needs to find a way to make the preview pane work again.

  • Anonymous
    June 21, 2015
    The comment has been removed

  • Anonymous
    December 17, 2015
    Has this problem anything specifically to do with a Citrix session or does it apply to any RDP scenario? One of our clients is facing the same problem and she is seeking an answer (and most of our customers log into the servers using Citrix). Can anyone help clarifying the so-called anomaly? Thanks a ton in advance, Venky

  • Anonymous
    January 20, 2016
    Run saved my day .Thanks!!!

  • Anonymous
    February 02, 2016
    Run saved my day too. Thanks Greenmtnsun !

  • Anonymous
    February 22, 2016
    'Run' worked for me too...