Click here to Skip to main content
15,908,776 members
Please Sign up or sign in to vote.
1.00/5 (1 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 14-Aug-19 5:52am    
And what's your issue?
MaximusDebois 17-Aug-19 7:17am    
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900