Looks good. For deploying if you are using InstallShield there are merge modules to ease the process
http://www.installshield.c
mlmcc
Main Topics
Browse All TopicsI'm working with crystal report and Visual Basic. I'm using Crystal Report for the first time.
I need help on how to call crystal report file (.rpt) file using Crystal Report Viewer Control using VB Application.
I have added required references to my vb project. I've also created report using Crystal Report and saved it in Report Folder where my application will be installed.
I'm using MS SQL Server as backend. I'm using Crystal Report 8.5.
I have added Crystal Viewer Control in one Form. What code i need to write to open the report without any error and updated data?
Can any one provide me sample application? Please Help. It is urgent. I'm new guy for Crystal Report.
Thanks,
Rakesh Sompura.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Looks good. For deploying if you are using InstallShield there are merge modules to ease the process
http://www.installshield.c
mlmcc
Thank you for the code. I've written the same code that you have pasted above.
When I'm trying to open the report it gives me the error "Server has not been yet started".
Do you have any idea why it gives this error?
I've created DSN also but still it gives the same error.
One More thing i want to ask that Which type of database i need to choose while creating reprot in Crystal Report 8.5?
Do I need to choose ODBC or SQL Server Database from More Database Option.
I'm using Crystal Report Expert and Standard Report Format.
Please Help!
Thx,
Rakesh Sompura
"Do I need to choose ODBC or SQL Server Database from More Database Option."
That's up to you. ODBC would give you a bit more flexibility since it wouldn't be absolutely necessary to have the SQL Server client components installed to connect.
This document contains many of the reasons for the 'Server Not Yet Opened' error. I suggest you have a look at it.
http://support.businessobj
One of the potential issues mentioned in the above whitepaper deals with the database schema being saved with the report file. This happened to us at some point when we started renaming our databases something other than the default name. The temporary fix was to open up each report, go to Database > Set Location, and remove the schema from the table names (e.g. change 'DBName.dbo.TableName' to just 'TableName'). The runtime solution was to remove the schema at runtime by parsing DatabaseTable's Location property:
'Loop through the report's tables, set the LogOnInfo, and erase schema, if necessary
Dim crxTable As CRAXDRT.DatabaseTables
For Each crxTable In crxRpt.Database.Tables
crxTable.SetLogOnInfo "ServerOrDSNName", "DBName", "UserID", "Password"
If InStr(crxTable.Location, ".dbo.") > 1 Then
crxTable.Locaton = Split(crx.Location, ".")(2)
End If
Next crxTable
Once the schema is gone, if you're using an ODBC connection, it will should the default database of the ODBC connection.
-dave
Nosotros tenemos los reportes en Crystal Report 8.5 los reportes los tenemos conectados directamente con Database Files haciendo referencia a una base de datos directa en Access. Este reporte queremos que lo genere tanto para Access como para SQL Server. Que debemos hacer. Hay que cambiarle la conexion en algun lado para que me genere los reportes en SQL Server????
Al darle la conexion con el reporte siempre saca los datos existentes en la base de datos de Access. Que debemos hacer para que me saque los datos existentes en SQL Server.
crxRpt.Database.Tables(1).
Por favor, necesitamos una pronta solucion
We have the reports in Crystal Report 8.5 the reports have them connected directly with Database Files referring to a direct base of information in Access. This report we want that it(he,she) generates it both for Access and for SQL Server. That we must do. Is it necessary to change the connection in algun side in order that it(he,she) me generates the reports in SQL Server????
On having given the connection to him with the report always it(he,she) extracts the existing information in the base of information of Access. That we must do in order that it(he,she) me extracts the existing information in SQL Server.
CrxRpt. Database. Tables (1) .SetLogOnInfo "ServerOrDSNName", "DBName", "UserID", "Password"
Please, we need a prompt solution
Business Accounts
Answer for Membership
by: vidruPosted on 2005-02-13 at 06:30:45ID: 13297678
You can get the sample apps here: ects.com/c ommunityCS / Technical Papers/app s_rdc.pdf. asp
& "\Reports\Profile.rpt")
SetLogOnIn fo "ServerOrDSNName", "DBName", "UserID", "Password"
http://support.businessobj
If you're using the RDC, here is the minimum code you need to run a report against SQL Server:
'General Declarations
Dim crxApp As New CRAXDRT.Application
Dim crxRpt As CRAXDRT.Report
Private Sub Form_Load()
'Open the report
Set crxRpt = crxApp.OpenReport(App.Path
'Clear any saved data to force to report to read from the db
crxRpt.DiscardSavedData
'Set the connection for the report.
crxRpt.Database.Tables(1).
'View the report
CRViewer.ReportSource = crxRpt
CRViewer.ViewReport
-dave