Writting the following expression in the JumpToURL property of the Report in SSRS:
="http://localhost/ProjectName/Page.aspx?Month=" & Fields!MOnthName.Value & "&Year=" & Fields!YearName.Value
will take user to the Report when clicked. It passes the two Query parameters "MonthName" and "Year" to the Page.aspx page.
Now in Page.aspx page use the following code :
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load sQueryParameterMonth = Request.QueryString("Month").ToString() sQueryParameterYear = Request.QueryString("Year").ToString() PrintReport(sQueryParameterMonth, sQueryParameterYear End Sub
Private Sub PrintReport(ByVal QueryParameterMonth As String, ByVal QueryParameterYear As String)
Dim pInfo As ReportParameterInfoCollection Dim paramList As New Generic.List(Of ReportParameter)
rptViewer.ProcessingMode = ProcessingMode.Remote rptViewer.ServerReport.ReportServerUrl = "Specify connectionsetting for Report URL" rptViewer.ServerReport.ReportPath = "Specify Report Path" paramList.Add(New ReportParameter("MOnthName", QueryParameterMonth, False)) paramList.Add(New ReportParameter("Year", QueryParameterYear, False)) rptViewer.ServerReport.SetParameters(paramList) rptViewer.ServerReport.Refresh()
End Sub
it will take you back to the Parent Report in SSRS
|
| Author: Miss Meetu Choudhary 11 Oct 2009 | Member Level: Diamond Points : 1 |
No Formatting, and Many Gramatical Issues. so points Deducted
++ Thanks and Regads Meetu Choudhary Site Coordinator.
|