Report Viewer help
Hi all i have an issue with my report viewer, I am calling this .ctlReportViewer.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout); rather than this .ctlReportViewer.RefreshReport because I want it to appear in print layout mode. This works ok except for in one instance. When the report server hasnt been access for a while, or has been restarted, the call to SetDisplayMode seems not to call my custom embedded code. If I change the code to RefreshReport, it does seem to call my custom code.... If I go to Report Manager and run the report, then run my code that calls SetDisplayMode, seems to work properly from then on. I thought that SetDisplayMode was supposed to call RefreshReport, and effectively be exactly the same?????? They arent seeming to act the same at all initially until a report has been run on the server. I am using SQL Server 2008 and Reporting Services 2008  
June 20th, 2011 10:48pm

Hi ClareMoore, From your scenario, you would like to know why SetDisplayMode doesn’t call custom embedded code when report server hasn’t been access for a while or has been restarted, but when calling the RefreshReport method, all works well again, right? Please correct me if my understanding is wrong. Just as you said, ReportViewer.SetDisplayMode(DisplayMode.PrintLayout) method internally calls the RefreshReport() method. I am afraid the issue you have got is an issue. If you have any concern about this, please submit a feedback at http://connect.microsoft.com/SQLServer/Feedback and hope Microsoft improve this feature in the next service pack or product release. Thanks for your understanding. Eileen
Free Windows Admin Tool Kit Click here and download it now
June 23rd, 2011 11:46am

Hi there Eileen that is exactly the problem i am having.
June 24th, 2011 1:30am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics