How to filter crystal report in C#?

c#, crystal-reports, filtering

Solution

If you are filtering programatically, you can type

crystalreportViewr1.selectionformula="{Report.Fieldname}='"+filterdata+"'"; 

This is for filter the `string` data type. For `int` data type to be filtered,

crystalreportViewr1.selectionformula="{Report.Fieldname}="+filterdata;

Problem

When I select values from drop down then click on show button it should show the crystal report for that selection.

Original source