I have some code that calls a report, but even if I pass parameters into the report the user still needs to click the "View Report" button before the report itself will render. Is there any way to change this?
Function Report(vm As ReportParameterViewModel) As ActionResult
''lazy loading of report details, path
Dim reportDetails = Reports.Value
reportDetails.Load(vm.ReportId)
''private function that returns ReportViewer and sets a few details of it
Dim viewer = SetUpReportViewer()
viewer.ServerReport.ReportServerUrl = reportDetails.ReportServerUrl
viewer.ServerReport.ReportPath = reportDetails.ReportPath
viewer.ServerReport.SetParameters(GetParams(vm))
viewer.ServerReport.Refresh()
ViewBag.ReportViewer = viewer
Return View()
End Function
Is there something I can add to have the report run immediately, without user interaction?