create reports with filtering option

Hello_world

New member
Joined
Jul 20, 2008
Messages
4
Programming Experience
Beginner
Hello everybody,

I have a simple application developed in VB.Net and I wanted it to produce a report. But the report will depend on the filtering option that the user entered.

Example:
The application provides 2 fields as filters, Name and age.

Scenarios:
1. If the user did not enter anything in any of the fields, the report generated will contain all the records available.
2. If the user entered Jane in the name field, the report will only show all records with the name Jane regardsless of the age.
3. If the user entered 20 in the age, the report will show all records with the age 20 regardless of the name.

Question:
How can I do this? I am using VB.Net; MSSQL 2000 for database; and the VB.Net embeded crystal report for displaying the report.

Thanks in advance and I hope you can help me even if this means taking a lot of our time due to the possible instuctions that I will have to follow. :D
 
if you have any knowledge in sql satements then u can do it:

dim Rpt as new RepoortNameObject
'i haven't remember the commad exactly please check
Rpt.RecordSelectionFoumula = "{table.field}='search Text'"
 
Back
Top