New to SSRS - Pass query paramater at runtime
Hi all, Im new to SSRS, basically I have created and deployed a report to my reporting server. Now I have a query parameter on my report. From my application, I can access the report manager, and here it asks me for my variable. I'm not sure if my question is a vb.net one, but I was wondering if anyone knew how I could pass my query paramater to SSRS at runtime. Basically it would be easier for my users if they could just see the report they are interested in, rather than having to type the variable in to be able to see the report. Thanks for your time. Barry Andrew
June 21st, 2007 2:29pm

Here is a bit I use to pass aparam to the report at run time from vb.net. Note that I'm using the report in local mode, so I'm accessing the object through the ReportViewer control. Hope this helps! Dim o As LocalReport = ReportViewer1.LocalReport Dim oParmList As New List(Of Microsoft.Reporting.WinForms.ReportParameter) Dim sAuthString As String = "" sAuthString = "my parameter value goes here" Dim oAuthparm = New Microsoft.Reporting.WinForms.ReportParameter("Authors", sAuthString, False) oParmList.Add(oAuthparm) o.SetParameters(oParmList)
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2007 5:17pm

Hi All, I have configured the ReportParameter as following, but it is not visible on RunTime ? Any idea why ? I am going in wrong direction, please help. LocalReport oLocalReport = ReportViewer.LocalReport; List<ReportParameter> oParmList = new List<ReportParameter>(); String sResidentID = ""; sResidentID = "RES100"; ReportParameter oReportParameter = new ReportParameter("ResidentID",sResidentID, true); oParmList.Add(oReportParameter); oLocalReport.SetParameters(oParmList);
March 7th, 2008 12:13am

If you are using VS 2005. You can set a default vales for each parameters. Go to the following blog for detail on what you need to VS 2005. http://ssrsdeveloper.blogspot.com/p/sql101.html
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2011 5:34pm

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

Other recent topics Other recent topics