Thursday, September 23, 2010 12:19 AM
I have VS 2008 SP1 and i have Crystal Reports installed.
I have a single form with a Crystal Report Viewer, I created a report with the wizard, and i want to show it in the report viewer, but it keeps showing blank. The DB is a MDB, and the code i have in the form that loads the data is the following:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim conn As New OleDb.OleDbConnection conn = New OleDb.OleDbConnection("PROVIDER=Microsoft.ACE.OLEDB.12.0;DATA SOURCE=|DataDirectory|\Scilla10.accdb") Dim Strcmdsel As String = "SELECT * from Muestras" Dim cmd As New OleDb.OleDbCommand(Strcmdsel, conn) Dim da As New OleDb.OleDbDataAdapter(cmd) Dim ds As DataSet = New DataSet("Muestras") Dim rptdocument As New CrystalDecisions.CrystalReports.Engine.ReportDocument da = New OleDb.OleDbDataAdapter(Strcmdsel, conn) da.Fill(ds) Dim strReportPath As String = "CrystalReport1.rpt" rptdocument.Load(strReportPath) rptdocument.Refresh() rptdocument.SetDataSource(ds.Tables(0)) CrystalReportViewer1.ReportSource = (rptdocument) CrystalReportViewer1.ShowRefreshButton = True CrystalReportViewer1.ShowRefreshButton = False CrystalReportViewer1.ShowPrintButton = True CrystalReportViewer1.Zoom(90) CrystalReportViewer1.DisplayGroupTree = False End Sub
That is the entire project, nothing else, im sure its something silly i missed. Any ideas?
- Moved by Helen Zhou Thursday, September 23, 2010 1:47 AM (From:Windows Forms Data Controls and Databinding)
Thursday, September 23, 2010 11:40 AM
This should be of some use
Thursday, September 23, 2010 6:06 PMThanks goodwillwins, but i couldnt find my answer there. Thank you anyway!
Thursday, November 18, 2010 4:15 PMDid you ever figure this out...I am having the same issue with VS2005 and CR2008?
Wednesday, November 24, 2010 1:06 AManother dead end......
Workin it out baby