I have inherited an existing Crystal Report (.rpt) for a report that prints all records in the relevant dataset.
I now want to add selection criteria such that only the results with a matching ticket number are printed on the report.
The selection criteria I have entered is:
{REGISTER.TICKET_NO} = {?sTicketNo}
sTicketNo reflects a text value that I read from a text box in C# and pass to Crystal Reports as parameter. (The parameter passing definitely works. When I add the sTicketNo field to the report, it prints the correct value that I entered in the text box).
The problem is that no matter what selection criteria I enter, the reports never get filtered. It always prints ALL the records regardless of criteria. I have tested with other hard-coded criteria such as selecting only records with non-null values.
I have also tried the advice from C# and Crystal Reports SDK - Selection Criteria Ignored without success.
Is there perhaps anywhere else in Crystal Reports that you have to specify that you don't want all records printed? I have added my selection criteria in menu "Crystal Reports" > "Report" > "Select Expert" > "Record". I am very new to crystal reports. Maybe the author of the report added some setting elsewhere to ignore selection criteria, but I'm not sure where to look...