General discussion


Can Not Open Sql Server-Crystal Reports

By ramadongre ·
I have two problem with Crystal report( usage with VB 6.0.

I am using CRPE for generating report. Also report uses (sql server 2000) stored procedures. Whenever generating report, shows error message, 'Can Not Open Sql Server'. I have made sure that data is not saved with report, the select query return same columns from procedure.

The second problem is sometimes i can not edit report since i can not access Database menu. The reason being it shows an empty message box without any proper message, thus prevents me to access the tab.

Can anybody please give me a solution! The code being used is listed below.
Dim cDatabase As CRPEAuto.Database
Dim cTable As CRPEAuto.DatabaseTable
Public cReport As CRPEAuto.Report

Set cReport = cApplication.OpenReport(filename)
cReport.ParameterPromptingEnabled = True
Set cDatabase = cReport.Database
Set cTable = cDatabase.Tables(1)
With cTable
.SetLogOnInfo DBServerName, DatabaseName, "DBName", "PassWord"
.SetSessionInfo "DBName", "PassWord"
End With

cReport.Preview "Caption" , 0, 0, , , WS_MAXIMIZE Or WS_SYSMENU Or WS_MAXIMIZE Or WS_MINIMIZEBOX

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Related Discussions

Related Forums