Crystal Engine.LogOnException problems 
Author Message
 Crystal Engine.LogOnException problems

Seems like I'm joining the many that have struggled with this problem.  I'd
love to know why simple stuff like logging onto a database is made such a
cryptic problem to solve.  And also why the documentation covering this area
is so ambiguous.

Here's my sample code.  crRPT is a ReportDocument object.

Dim crLogonInfo As New CrystalDecisions.Shared.TableLogOnInfo()

With crRPT
    ' Load the report
    .Load("c:\Reports\MyReports.rpt", 1)
    ' Set the logon information
    crLogonInfo = .Database.Tables(0).LogOnInfo
    With crLogonInfo.ConnectionInfo
        .ServerName = "MyServer"
        .DatabaseName = "MyDB"
        .UserID = "MyUID"
        .Password = "MyPW"
    End With
    .Database.Tables(0).ApplyLogOnInfo(crLogonInfo)

    ' Set the connection information for the table in the report.
    crLogonInfo = .Database.Tables.Item(0).LogOnInfo
    crLogonInfo.ConnectionInfo.ServerName = "MyServer"
    crLogonInfo.ConnectionInfo.DatabaseName = "MyDB"
    crLogonInfo.ConnectionInfo.UserID = "MyUID"
    crLogonInfo.ConnectionInfo.Password = "MyPW"
    crLogonInfo.TableName = "MyDB.dbo.Proc(MyStoredProcName;1)"

End With

I then go on to set some report parameters before calling the Export()
method to run the report into PDF format.  Until I added the parameter info
it was opening the report just fine, but this is because the report wasn't
hitting the database while I wasn't providing parameter info.

Questions:
1.  Which of the methods above should be used for logging on?  Both?
2.  What's the format of the TableName parameter of TableLogOnInfo object?
3.  Would I be better off executing the stored proc into a dataset and
throwing the dataset at the report rather than getting the report to hit the
database?

It's driving me mad!!

Thanks in advance for your help.

Rob C-W



Mon, 25 Jul 2005 05:08:49 GMT  
 Crystal Engine.LogOnException problems


Fri, 19 Jun 1992 00:00:00 GMT  
 Crystal Engine.LogOnException problems
Problem solved.

To cut a long story short, it turned out that the original report that I had
designed with Crystal Reports was not an OLE DB report and therefore could
not be opened programmatically via the Crystal engine in VB.Net.  I've since
redesigned all of my reports in Crystal as reports with OLE DB as their
method of communicating with SQL Server and they all run now (even the
parameter passing works).

I hope this helps someone else out there, because I was tearing my hair out
and Crystal support were pretty slow in their responses to the many emails
that I sent them about this.

Rob



Sat, 30 Jul 2005 21:02:01 GMT  
 Crystal Engine.LogOnException problems
Can you tell us how you were connecting originally?


Quote:
> Problem solved.

> To cut a long story short, it turned out that the original report that I
had
> designed with Crystal Reports was not an OLE DB report and therefore could
> not be opened programmatically via the Crystal engine in VB.Net.  I've
since
> redesigned all of my reports in Crystal as reports with OLE DB as their
> method of communicating with SQL Server and they all run now (even the
> parameter passing works).

> I hope this helps someone else out there, because I was tearing my hair
out
> and Crystal support were pretty slow in their responses to the many emails
> that I sent them about this.

> Rob



Sun, 31 Jul 2005 01:13:53 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed

2. CrystalDecisions.CrystalReports.Engine.LogOnException: Logon failed

3. Problem using Seagate Crystal Report Automation Engine 7.0

4. Crystal Engine Preview Problem

5. Crystal engine problem

6. Crystal Report 7 ActiveX (craxdrt.dll) vs Crystal Report Engine (CPEAUTO.dll)

7. Crystal report engine missing

8. Query Engine Error with Crystal Reports

9. Crystal Reports Query Engine Error?

10. Crystal Reports Print Engine

11. Crystal Print Engine Question

12. Calling Crystal Reports Print Engine?

 

 
Powered by phpBB® Forum Software