Print Page | Close Window

Microsoft Access VB 8 and Crystal Report

Printed From: Crystal Reports Book
Category: Crystal Reports .NET 2003
Forum Name: Data Connectivity
Forum Discription: How to connect to data sources and export reports
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=2616
Printed Date: 09 May 2024 at 5:31pm


Topic: Microsoft Access VB 8 and Crystal Report
Posted By: JCortez
Subject: Microsoft Access VB 8 and Crystal Report
Date Posted: 14 Mar 2008 at 7:58am
Hi all,
I am working with VB 8 - 2005 and Crystal Reports. However, I can't make my report display any data from my Access DB.
 
It is somewhat funny, though, since in the crystal report viewer in which the reports is embedded, strange fields like dates and names of the week appear, but these have nothing to do with the data in the DB.
 
This code fragment comes from the click event o f a button, my idea was to load a report when click occurs, however, nothing happens. No report or data fields from my db is displayed
 
<!-- beginning of code -->
 
Main.reportDocument1.FileName = "F:\inventoryDatabase\Inventory_Database\WindowsApplication1\CrystalReport1.rpt"

Main.reportDocument1.Load("F:\inventoryDatabase\Inventory_Database\WindowsApplication1\CrystalReport1.rpt", CrystalDecisions.Shared.OpenReportMethod.OpenReportByDefault)

CrystalReportViewer1.ReportSource = Main.reportDocument1

CrystalReportViewer1.RefreshReport()

Me.CrystalReportViewer1.Update()
 
<!-- end of code -->
Please provide me with a sample code, if you have any.
Willing to provide any details.
Thanks beforehand.
 
JCortez
 



Print Page | Close Window