exec dbo.[Sales by Year] '<%TestVar%>', '01/01/03'
Basically, what this code is doing is calling the 'Sales By Year' stored procedure that is in the Northwind database. This stored procedure takes two parameters: Beginning Date and Ending Date. So '<%TestVar%>' is the beginning date and '01/01/03' is the Ending Date. When using the ActiveReport parameter collection you have two ways to pass the parameter value in:
[C#]ReportName rpt = new ReportName();rpt.Parameters["TestVar"].Value = "1/19/1992"; rpt.ShowParameterUI = false;rpt.Run(false);this.ARViewer.Document = rpt.Document;[Visual Basic]Dim rpt As ReportName rpt = New ReportName()rpt.Parameters("TestVar").Value = "1/19/1992"rpt.ShowParameterUI = Falserpt.Run(False)Me.ARViewer.Document = rpt.Document