cancel
Showing results for 
Search instead for 
Did you mean: 

Error after migration to Crystal Reports 12 for existing reports

Former Member
0 Kudos

Hi,

We had reports written using Crystal Reports Version 8.5. These reports were not modified for a long time. Recently, we had migrated to Crystal Reports 12 (2008). Some of the these existing reports were modified using the Crystal Reports 2008 designer. After installing our application (we ship Merge Module of Crystal Reports 12 i.e. 2008 which gets installed in GAC)

1) If we create new reports in 2008 designer and try to view these reports, it works as expected without any issue(s).

2 ) However, if these modified reports are tried to be viewed, there is an error which states "Database Logon Failed".

Details:

CrystalDecisions.CrystalReports.Engine.LogOnException {"Database logon failed."}

ErrorID CrystalDecisions.CrystalReports.Engine.EngineExceptionErrorID.LogOnFailed

InnerException {"Database logon failed."}

Message "Database logon failed."

Source "CrystalDecisions.ReportAppServer.DataSetConversion"

Stack Trace at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)

at CrystalDecisions.ReportSource.EromReportSourceBase.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.ExportToStream(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.FormatEngine.Export(ExportRequestContext reqContext)

at CrystalDecisions.CrystalReports.Engine.ReportDocument.ExportToDisk(ExportFormatType formatType, String fileName)

TargetSite {Boolean ThrowDotNetException(System.Exception)}

Also, it is worth to note that if we try to view these modified reports from any environment which has both Crystal Reports 10 and Crystal Reports 12 in GAC, then these reports work as expected.

P.S. We have mechanism in application's code to reset the database connections when any report is being viewed using ReportDocument class' method.

From the above scenario I believe issue is specific to migration to Crystal Reports 12 (2008). Any help /workaround to solve this problem will be highly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Make sure you have the latest SP for CR 2008 installed;

https://smpdl.sap-ag.de/~sapidp/012002523100009038092009E/cr2008win_sp2.exe

Ensure you are deploying SP 2 runtime;

MSM

https://smpdl.sap-ag.de/~sapidp/012002523100009159092009E/cr2008sp2_mm.zip

MSI

https://smpdl.sap-ag.de/~sapidp/012002523100009159002009E/cr2008sp2_redistinstall.zip

If that does not help;

1) Do these reports work in the designer?

2) What database are you using and what is the connection type?

3) Compare the dlls loading on the systems where this app works (environment which has both Crystal Reports 10 and Crystal Reports 12 in GAC) and a system that is giving you the error. Use the [Modules|https://smpdl.sap-ag.de/~sapidp/012002523100006252802008E/modules.zip] utility.

4) Open the reports in the designer and look at the properties in the Database menu -> Set Datasource Location. Check to see if there are any differences between the two reports.

5) If there is a subreport in the report that causes the issue, remove it and see if the report works without the subreport.

Ludek

Former Member
0 Kudos

Hi Ludek,

Thanks for your reply. I tried all these but without much success. We were testing the reports on MSSQL and Sybase. The actual problem looks something different. The modified report has a different data source which we thought will be getting overridden by our application. The real culprit however we feel is the provider for data source. Earlier it was "SQLOLEDB" and after modification it was "SQLNLCI" (Sql Server Native client which was absent on machine on which issue occurred). Could you please confirm that having a different provider can create this problem. Also, should be written provider specific i.e. separate reports for MSSQL and Sybase? Please let us know.

Thanks,

Gulab.

former_member183750
Active Contributor
0 Kudos

+ Earlier it was "SQLOLEDB" and after modification it was "SQLNLCI" (Sql Server Native client which was absent on machine on which issue occurred). Could you please confirm that having a different provider can create this problem.+

Yes this will cause issues as the logon connection parameters would be different. In the CR designer, compare the connection properties of a report using SQLOLEDB" and "SQLNLCI". What ever you see in the designer, you will need to match in code.

Also, should be written provider specific i.e. separate reports for MSSQL and Sybase? Please let us know.

The database is not as important as the type of connection. E.g; if you use OLE DB to connect to MSSQL and then change to OLE DB Sybase you should not have problems - as long as the data format matches very closely (almost perfectly). Enabling Verify on Firs refresh and Verify Stored Procedure on First Refresh will help a bit here.

If you are trying to change from ODBC to OLE DB, then you will have to use RAS APIs.

Ludek

Former Member
0 Kudos

Hi Ludek,

Thanks. Your reply clears my doubt and answers my queries.

Regards,

Gulab

Answers (0)