Binding a dataset to crystal report at run time - vb.net ms access
Posted on 2006-05-08
I have vb.net code where in i define the sql with where condition based on certain user selection criteria.
ReportDS = Select * from employee where emp_id = combobox1.selectedvalue and emp_name ='abc'
The sql works fine. I create a dataset of the result set return from this query.
My table has 100 records, based on this query i should get 10 records.
Now. i use something lise this
Dim DocReport As New DoctorReport
Me.CrystalReportViewer1.ReportSource = DocReport
The crystal report viewer displays all 100 records.
While create the crystal report thru wizard.
oble db , jet engine 4 ..
then i point it to my mdb file, then i add my required table.
then i select only particular fields which i require.
no other selection.
i just want to show report based on my dataset. but what is actually happening is its not considering my dataset and i just displaying all records.
plzz help me in my logic or the way it should be done..