abuzakour
July 26th, 2005, 11:30 AM
Hi all,
well i have a small problem but spent tooooo much time and can't figure out what to do
i have a .net application and using MSSQL 2000.
i added crystal reports and linked it using the Report Expert to my Table. I made the layouts and added the database fields to the new crystalreport.rpt file.
when loading the report.vb form:
Private Sub Report_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As CrystalReport = New CrystalReport()
CrystalReportViewer.ReportSource = a
End Sub
thank god. i can print the whole table.
now my question is that ....
in my code i created a dataset called DsSearchResults from a select from query and displayed it on a datagrid. Now i want to print only these results.
i am trying with all ways to pass the new dataset the the crystalreport and crystalreportviewer by all ways
crystalreport.SetDataSource(dsResults)
CrystalReportViewer.ReportSource = crystalreport
crystalreport.refresh
crystalreport.refreshReport
crystalreport.show
i don't know why it keeps showing me the whole table!
i even tried crystalreport.setdatasource("") and i still get the whole table.
is there a way i pass the dataset programatically? i am sure i am missing something ... please help
well i have a small problem but spent tooooo much time and can't figure out what to do
i have a .net application and using MSSQL 2000.
i added crystal reports and linked it using the Report Expert to my Table. I made the layouts and added the database fields to the new crystalreport.rpt file.
when loading the report.vb form:
Private Sub Report_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim a As CrystalReport = New CrystalReport()
CrystalReportViewer.ReportSource = a
End Sub
thank god. i can print the whole table.
now my question is that ....
in my code i created a dataset called DsSearchResults from a select from query and displayed it on a datagrid. Now i want to print only these results.
i am trying with all ways to pass the new dataset the the crystalreport and crystalreportviewer by all ways
crystalreport.SetDataSource(dsResults)
CrystalReportViewer.ReportSource = crystalreport
crystalreport.refresh
crystalreport.refreshReport
crystalreport.show
i don't know why it keeps showing me the whole table!
i even tried crystalreport.setdatasource("") and i still get the whole table.
is there a way i pass the dataset programatically? i am sure i am missing something ... please help