اخواني هذه اول مرة اعمل فيها مع الكريستال ريبورت
ما اريد ان انشات dataset برمجيا واريد ان اعرض محتواها على كريستال ريبورت , وانا وجدت هذا الكود :
strReportName = "CrystalReport2"
Dim strReportPath As String = Application.StartupPath & "\" & strReportName & ".rpt"
If Not IO.File.Exists(strReportPath) Then
Throw (New Exception("Unable to locate report file:" & vbCrLf & strReportPath))
End If
'Assign the datasource and set the properties for Report viewer
Dim rptDocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument
rptDocument.Load(strReportPath)
rptDocument.SetDataSource(DS.Tables(0))
rptViewer.ShowRefreshButton = False
rptViewer.ShowCloseButton = False
rptViewer.ShowGroupTreeButton = False
rptViewer.ReportSource = rptDocumentالمشكلة عندي لا اعرف كيف اقوم بتصميم الريبورت مسبقا , يعني هل الحقل ستظهر على الريبورت بشكل تلقائي ام اني بحاجة لبعض الأعدادات على التقرير .