Crystal Reports Tutorial Update

Recently I receive a comment on the database path error. This error occurs because the database location is not relative to the application path. In our example on How to Print Using Crystal Reports the base path for the application is located under the debug folder.

For the sake of this tutorial I move the database within the data folder relative to the debug folder to avoid any error.

In addition the following code has been added to call the database path.

  1. Dim tbCurrent As CrystalDecisions.CrystalReports.Engine.Table
  2. Dim tliCurrent As CrystalDecisions.Shared.TableLogOnInfo
  3.  
  4. For Each tbCurrent In mReport.Database.Tables
  5.         tliCurrent = tbCurrent.LogOnInfo
  6.     With tliCurrent.ConnectionInfo
  7.         .ServerName = Application.StartupPath & "\Data\Data.mdb"
  8.         .UserID = ""
  9.         .Password = ""
  10.         .DatabaseName = Application.StartupPath & "\Data\Data.mdb"
  11.     End With
  12.     tbCurrent.ApplyLogOnInfo(tliCurrent)
  13. Next tbCurrent

Due to hectic schedule I cannot answer all questions which require too much time to debug and or modify the program.

Crystal Reports

Hi out there ! This is not really a comment but a question: My a new at programming. Do I need a different piece of software to view crystal report in my VB 2008 projects ?

In reply to by Anonymous (not verified)

You just need VB 2008 professional or team edition. This will not run on VB 2008 Express Edition.

I have an existing simple DSR Data Report in VB 6.0 created using MS Access DataBase (NorthWind) using Data Environment. I am creating a new Crystal report in VS 2008 (.net 3.5) and use the option creating from Existing report and map it to the .dsr (data report in VB 6.0) report. But when i do that i get an error logged as "Could not access the database from the Data Environment. Check your Data Environment." Also if i try to create a Simple Data Report (.dsr) in VB 6.0 without using Data Environment by creating a user control and keep the recordset there and add that recordset as data source to the Data Reoprt. Now when i try to create a crystal report in .net 3.5 using the option from the 'Existing Report' and then select the .dsr report in vb 6.0 then also i get the erro as - 'Missing DataEnvironment DSR File c:\program files\microsoft visual studio\vb98\data report\Form1.ReportDS.dsr.'

hi ser im making a report but the crystal report data is not changed.. for example i edit th data in the data base but the crystal report didnt change the displayed value tnx po

i'm new to this site also to .net. i'm currently working in .net. can anybody tell me the simple procedure for getting the details of a single record from database. i need the step by step procedure . what controls to be taken and what code to be given . i know only the connection method to retrieve the whole table in crystal reports. now, i need to know how to retrieve a single record and also only selected fields to be displayed in the crystal report form, that i have designed.i searched some article.. its given create rpt file.. i don't understand this..

hello please help me printing a single record using msaccess DB and crystal report

hello please help me in creating crystal report with php pelase guide me step by step thanks in advance

Add new comment