CrystalReportViewer.ViewTimeSelectionFormula Property
Gets or sets the record selection formula to filter the data that are currently used in the report.
Namespace CrystalDecisions.Windows.Forms Assembly CrystalDecisions.Windows.Forms (CrystalDecisions.Windows.Forms.dll)
Syntax
'Declaration
Public NotInheritable Property ViewTimeSelectionFormula As String
public sealed string ViewTimeSelectionFormula {get; set;}
Example
This example shows how to set the ViewTimeSelectionFormula property for the report.
'Declaration
Private Sub SetViewTimeSelectionFormula(ByVal mySalesAmount As String, ByVal myCustomerName As String)
Dim mySelectionFormula As String = "{Customer.Last Year's Sales} > " & mySalesAmount _
& " AND Mid({Customer.Customer Name}, 1) > """ & myCustomerName & """"
CrystalReportViewer.ViewTimeSelectionFormula = mySelectionFormula
End Sub
private void SetViewTimeSelectionFormula(String salesAmount, String customerName)
{
String selectionFormula = "{Customer.Last Year's Sales} > " + salesAmount
+ " AND Mid({Customer.Customer Name}, 1) > \"" + customerName + "\"";
crystalReportViewer.ViewTimeSelectionFormula = selectionFormula;
}
Version Information
Crystal Reports Basic for Visual Studio 2008
Supported since: Crystal Reports .NET 10
See Also
Reference
CrystalReportViewer Class
CrystalReportViewer Members
CrystalDecisions.Windows.Forms Namespace