|
Prev: No connection could be made because the target machine actively re
Next: Report Manager Virtual Directory disabled
From: dbuchanan on 23 Jun 2008 02:37 I am using ReportViewer with web forms and would like to allow the user to link to other reports based on what the user clicks on in the report. I waint to allow the user to drill down to deeper levels of a hierarchy by clicking on the Group level in the displayed report.. I understand that the mechanics of this is basically passing parameters from one ReportViewer to another and also detecting what textbox or underlying value was clicked on in the first ReportViewer. Then using that information as parameters for the next ReportViewer. I am using ReportViewer in Local mode so this would not be like going out to the report server. I wouold need to open another ReportViewer control and pass specific parameters to it. I can imagine one would use some kind of textbox click to move up (or back to the first previous ReportViewer. I would then imagine that these action could be managed by the code so that one could check the permissions level of the user to determine if they were allowed to see the target Report. Please explain how this is done or direct me to documentaion that applies to my circumstances. Thank you, Doug
From: "Charles Wang [MSFT]" on 23 Jun 2008 07:31 Hi Doug, I understand that you would like to link other report when you click on the group level in your report in reportviewer control. The other report should be displayed in different reportviewer controls (in different web forms). If I have misunderstood, please let me know. This is a typical drillthrough report requirement and can be easily implemented in server side report. However for local report, you may need to write more code to control the data rendering. First I recommend that you set the group level field Navigation property "Jump to URL" to your other web page that contains a new reportviewer control with your other report. You can use Expression to set the value of "Jump to URL" and append the values of your report parameters as URL parameters to the URL. In your first web page, before rendering the report, you can set your local report properties as following: this.ReportViewer1.LocalReport.EnableHyperlinks = true; this.ReportViewer1.HyperlinkTarget = "_blank"; this.ReportViewer1.LocalReport.Refresh(); In your second web page, you can first retrieve the URL parameters in Page_Load, filter the dataset according to the parameter value, bind the data source and render it in reportviewer, for example: =================================================== string strVal1 = Request.Params["VAL1"].ToString(); //Use ADO.NET to query your database to retrieve the dataset filtered by the parameter value DataSet ds = GetDatasetByVAL1(strVal1); //set the datasource of your reportviewer ReportDataSource rds = new ReportDataSource(); rds .Name = "Test"; rds .Value = ds.Tables["Test"]; localReport.DataSources[0]=rds; // Refresh the report reportViewer1.RefreshReport(); ================================================= If you would like to perform permission check, you can also write code here. Hope this helps. If you have any other questions or concerns, please feel free to let me know. Best regards, Charles Wang Microsoft Online Community Support =========================================================== Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg(a)microsoft.com. =========================================================== Get notification to my posts through email? Please refer to http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif ications. Note: The MSDN Managed Newsgroup support offering is for non-urgent issues where an initial response from the community or a Microsoft Support Engineer within 1 business day is acceptable. Please note that each follow up response may take approximately 2 business days as the support professional working with you may need further investigation to reach the most efficient resolution. The offering is not appropriate for situations that require urgent, real-time or phone-based interactions or complex project analysis and dump analysis issues. Issues of this nature are best handled working with a dedicated Microsoft Support Engineer by contacting Microsoft Customer Support Services (CSS) at http://msdn.microsoft.com/subscriptions/support/default.aspx. ============================================================ This posting is provided "AS IS" with no warranties, and confers no rights. =========================================================
From: dbuchanan on 23 Jun 2008 18:48 Charles, Thank you very much for your reply.You've given me a great start. Although I plan to keep the report on this page instead of jumpping to another (sorry for not being clear enough) you have given me enough.that I feel I can take it from here. Thanks, Doug
From: "Charles Wang [MSFT]" on 23 Jun 2008 22:54
Hi Doug, Thank you for your response. I am glad to see that the suggestions are helpful. If you have any further questions or concerns, please feel free to let me know. Have a nice day! Best regards, Charles Wang Microsoft Online Community Support ========================================================= Delighting our customers is our #1 priority. We welcome your comments and suggestions about how we can improve the support we provide to you. Please feel free to let my manager know what you think of the level of service provided. You can send feedback directly to my manager at: msdnmg(a)microsoft.com. ========================================================= This posting is provided "AS IS" with no warranties, and confers no rights. ========================================================= |