Skip to content

Instantly share code, notes, and snippets.

@Injac
Last active December 19, 2015 10:29
Show Gist options
  • Save Injac/5940642 to your computer and use it in GitHub Desktop.
Save Injac/5940642 to your computer and use it in GitHub Desktop.
Shows how to extend a standard Telerik Report, to create filters at runtime using a new constructor.
/// <summary>
/// Initializes a new instance of the <see cref="YOURREPORT" /> class.
/// </summary>
/// <param name="YOURPARAMETER">The YOURPARAMETER.</param>
public YOURREPORTNAME(string YOURPARAM)
{
Filter userFilter = new Filter();
userFilter.Expression = "=Fields.YOURFIELD";
userFilter.Operator = FilterOperator.Equal; //CHOOSE YOUR OPERATOR HERE
userFilter.Value = String.Format("={0}", YOURPARAM);
this.Filters.Add(userFilter);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment