ActiveReports 13
Parameters Property (SectionReport)

GrapeCity.ActiveReports Assembly > GrapeCity.ActiveReports Namespace > SectionReport Class : Parameters Property
Returns a reference to the data source query parameters collection.
Public ReadOnly Property Parameters As ParameterCollection
public ParameterCollection Parameters {get;}

Property Value

An initialized Parameters collection.

The parameters collection is automatically populated when the report is started.  If parameters are specified in the report's DataSource, they will be added to the collection. 

For example, setting your RecordSource to the following SQL adds "Order Date" and "Order ID" to the parameters collection.

"SELECT * FROM orders WHERE OrderDate >= #<%OrderDate|Enter Order date|1/1/1995%># AND OrderID > <%OrderID|OrderID%>"

You can set the parameter values before the report starts or allow ActiveReports to collect the values from the user at run time.

Note:  Depending on your data source, you may need to add pound signs around the parameter syntax for dates (as in the "Order Date" example above) or apostrophes around the parameter syntax for strings, i.e. "SELECT * FROM Customers CustomerID = '<%CustomerID%>'"

Paste into the Viewer Hyperlink event.
private void arv_HyperLink(object sender, GrapeCity.ActiveReports.Viewer.Win.HyperLinkEventArgs e) 
     SectionReport1 rpt = new SectionReport1(); 
     Form1 frm = new Form1(); 
     rpt.Parameters["customerID"].Value = e.HyperLink.ToString(); 
     frm.arv.Document = rpt.Document; 
Paste into the Viewer Hyperlink event.
Private Sub arv_HyperLink(sender As Object, e As GrapeCity.ActiveReports.Viewer.Win.HyperLinkEventArgs) Handles arv.HyperLink        
Dim rpt As New SectionReport1()
Dim frm As New Form1()
rpt.Parameters("customerID").Value = e.HyperLink.ToString()
frm.arv.Document = rpt.Document
End Sub
See Also


SectionReport Class
SectionReport Members
ShowParameterUI Property