cancel
Showing results for 
Search instead for 
Did you mean: 

VerifyDatabase LogOnException InteropServices.COMException (0x80000000)

Former Member
0 Kudos

Experts,

On one of our client's machine, upon 'VerifiyDatabase()', the following exception has been thrown

CrystalDecisions.CrystalReports.Engine.LogOnException: Log on failed. ---> System.Runtime.InteropServices.COMException (0x80000000): No error.

at CrystalDecisions.ReportAppServer.ClientDoc.ReportClientDocumentClass.VerifyDatabase()

at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.VerifyDatabase()

at CrystalDecisions.CrystalReports.Engine.ReportDocument.VerifyDatabase()

--- End of inner exception stack trace ---

at CrystalDecisions.CrystalReports.Engine.ReportDocument.VerifyDatabase()

....

This works fine on our development machine and on many other customer machines.

The necessary assemblies have been installed on the customer machine using the merge modules with our installer.

Code extraction

ReportDocument RptDoc;

RptDoc.ResourceName = "ReportName.rpt"; // Embedded report file

RptDoc.Load();

RptDoc.SetDatabaseLogon(...);

ConnectionInfo crConnectionInfo = new ConnectionInfo();

crConnectionInfo.ServerName = "Machine
Sql_InstanceName";

crConnectionInfo.DatabaseName = "dbase_sqlServer2005";

crConnectionInfo.UserID = "UserID";

crConnectionInfo.Password = "Password";

foreach (Table crTable in crRptDoc.Database.Tables)

{

TableLogOnInfo crTableLogOnInfo = crTable.LogOnInfo;

crTableLogOnInfo.ConnectionInfo = crConnectionInfo;

crTable.ApplyLogOnInfo(crTableLogOnInfo);

}

RptDoc.DataSourceConnections[0].SetConnection(....);

RptDoc.VerifyDatabase(); // ==> Fails here

Additional information :

- This report connects with SQL Server 2005 database.

- Contains a sql query producing a table and a stored procedure

Any guidance in this regard is highly appreciated.

Thank you.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

If you don't verify, does the report run?

What version of CR?

What SP for CR are you on? Dev and runtime?

Web or Win app?

Recommendation;

Easiest way to troubleshoot this is to install the CR designer on that computer and see what happens if you try to run the report there. An Eval of CR 2008 can be downloaded from here;

http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

Ludek

Former Member
0 Kudos

Hi Ludek,

Thanks for reply.

It's a Windows Forms Application.

CR version : CR XI R2 --> (Assemblies of 11.5.3700.0 and some with 11.5.3300.0)

The .rpt file was an Embedded report created in VS2005 .NET 2.0 and now compiling the same using VS2008.

Report only works with NO database connection (i.e blank report without any data). It fails when expecting data from database.

The database is SQL Server 2005.

Originally the .rpt was populating 2 tables using a SQL query and another using a Stored procedure.

Now the stored procedure section has been removed and still couldn't produce the report.

Also, if I want to place a CR designer, which version to go for?

Regards,

RR_Raja

former_member183750
Active Contributor
0 Kudos

Good morning

At this time, I'm not even sure if this report works anywhere? E.g.; does it work in the CR XI r2 designer on your development computer?

Re. what version to test this with. My assumption was that this works on your development computer, in code and in the designer(?).

So, the sequence would be;

1) Get the report to work on your development computer in the CR designer (if you need help here, post to the [Report Design forum|;

2) If the report works in (1) above, get the report to work on your development computer from the app. Let me know if this does not work here. Make sure you have SP 6 for CR XI r2;

https://smpdl.sap-ag.de/~sapidp/012002523100015859952009E/crxir2win_sp6.exe

3) If it works in (1) and (2) above, try it from code on the deployed computer, ensuring you have used SP 6 for CR XI r2 runtime .

msm;

https://smpdl.sap-ag.de/~sapidp/012002523100000634042010E/crxir2sp6_net_mm.zip

msi;

https://smpdl.sap-ag.de/~sapidp/012002523100000633302010E/crxir2sp6_net_si.zip

4) If this works in (1) and (2) and not in (3), then this is where we want to try the designer on the deployed computer. Since you are using CR XI r2, download the CR XI r2 download from here;

http://www.sap.com/solutions/sapbusinessobjects/sme/freetrials/index.epx

Ludek

Former Member
0 Kudos

Thanks Ludek,

  • As I've mentioned in my 1st post, the report works on our development machine and other machines within our company.

The problem occurs in some of our customer's machines.

  • I've CR XI R2 SP6 installed.

  • If the database is an XML data set, the report works fine

BUT, if connecting to the SQL Server 2005 database directly, the Crystal Reports brings up the login dialog...

As we couldn't re-produce on our development machine, struggling to locate the problem.

===> To load the trial version, it's not possible downloading 1.3GB on the customer's machine.

Please, let me know what else to look for.

Looking forward,

RR_Raja

former_member183750
Active Contributor
0 Kudos

If you don't verify, does the report run?

Compare dlls loading on good and bad computers using [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip]. Look for CR differences, system dll differences, framework differences, and db client differences.

Try a new very simple report. One table, one field. Does that work?

Ludek

Former Member
0 Kudos

Ludek,

Thanks for your responses.

1. If VerifyDatabase() placed, It crashes at this location OR

2. It brings up the 'Database Login' dialog upon assigning the ReportDocument instance to the ReportViewer.ReportSource.

Using the modules I was able to notice some Crystal Report DLL differences between the Development and Customer machine.

I applied the CR XI R2 SP6 on the Development machine and applied SP6 on the customer machine using CR XI R2 SP6 merge module setup project.

I tried several times installing the SP6 MergeModule project and rebooted many times but still the old DLLs are intact.

I would appreciate if you can direct me what t o do after this.

NOTE: Installing the trial version is not possible as the customer is not willing to download as it's too large.

Regards,

RR_Raja

former_member183750
Active Contributor
0 Kudos

If you're not too far from the customer, you could take your CD and install CR there. Then uninstall when you're done. But in a nut shell, you're looking at a database connectivity issue of some sort (ya, call me genius...). Have a look at [this|http://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/b0225775-88c4-2c10-bd80-8298769293de] article for some troubleshooting steps. But honestly, your best ROI is to get the CR designer on that box and see what it does. It may be jut me not understanding the issues in the real world, but I don't see what the big deal is downloading the file. Yah, it's large. Why is that an issue? The designer can be uninstalled and your customer will get back the HD space.

Anyhow, have a look at that articel.

Ludek

Former Member
0 Kudos

I've already seen that article.

Ok. I'll update after fixing!

RR_Raja

Former Member
0 Kudos

Ludek,

Even installing the full Crystal Reports Designer haven't resolved the problem and still getting the 'logon' screen.

I installed the trial version downloaded from http://www.businessobjects.com/campaigns/forms/crystal/reports/developer/edition/datasave.asp

Upon failure after installing the trial version, installed the SP6 but still no luck.

I would appreciate your guidance in this regard...

RR_Raja

former_member183750
Active Contributor
0 Kudos

Right, but does the report work in the CR designer?

If you are changing any logons, can you do the same change in the designer?

Ludek

Answers (0)