Click here to Skip to main content
14,265,815 members
Rate this:
Please Sign up or sign in to vote.
See more:
Am working on a project in vb.net with sql server as my backend database. I have created a report using component one report c1report. I want to filter data so that only a selected data are display on the report.

What I have tried:

C1Report1.DataSource.RecordSource = "SELECT * from Finance"
C1Report1.DataSource.Filter = "DepartmentId = " + "%" + ComboBox1.Text + "%"
Posted
Comments
Maciej Los 3 days ago
   
And what's your issue?
MaximusDebois 16hrs ago
   
I have been able to solve it.
It should be:
C1Report1.DataSource.RecordSource = "SELECT * from Finance"
C1Report1.DataSource.Filter = "DepartmentId = " + "%" + ComboBox1.Text + "%"
c1PreviewDialogControl1.Document = c1Report1.Document

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100