Skip to Content
0

Runtime Error Crystal Reports for Visual Studio 2013

Sep 20, 2017 at 07:32 PM

143

avatar image
Former Member

Hello I'm getting the following error at runtime when I try to export to pdf a report in a web application (ASP.Net):

[COMException (0x800002cd): No es posible cargar la información de la base de datos.
Error en el archivo ListadoPacientes 6260_8416_{61F6CDDD-2AD1-4B59-87F4-16AA25670446}.rpt:

The enviroment I'm using is the following one:

O.S: Windows 7 Pro. 64bits

Visual Studio 2013 Premium + Crystal Reports for v.Studio 13.0.20 , Net.Framework 2.0

Database: Sybase ASE Server 15.7

My reports are connected to Sybase ASE Server using "Other Connections/Sybase Server", I'm using a ReportDocument object to work with the report and I pass Server_name, database_name, user and password in a ConnectionInfo Structure.

When I run the web application inside Visual Studio, everything works perfectly but when I publish the web application and I test in IIS I get that error ("Not able to load information from database") when I call any report.

I'm testing it in the same computer that I'm using to develop and with the same database server (which is also installed in the same computer).

Could you help me, please ?

Thanks in advance

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Don Williams
Sep 28, 2017 at 09:02 PM
0

On the download WIKI page there is an app to set Parameters, it has the ability to also to use the ReplaceConnection() API. See if that works for you, you can specify the OLE DB Provider in that code.

This app will generate VB or C# code to get the connection info:

https://apps.support.sap.com/sap/support/knowledge/public/en/1553921

Don

Show 1 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thank you very much ! I'll take a look at it.

Best regards

Toni

0
Don Williams
Sep 21, 2017 at 01:56 PM
0

Hi Toni,

Run in Debug mode and validate the logon info is correct.

Then use ProcessMonitor and see if the Sybase Client is accessible to the IIS account it is running under.

CR runtime is not for the OS platform but for the platform your app is running under, so if IIS is running in 64 bit mode then you need to add a 64 System DSN to the computer and use the 64 bit CR MSI.

Don

Show 2 Share
10 |10000 characters needed characters left characters exceeded
Former Member

Thanks Don.

I've verified that logon information is correct. The only way I've found to make it work so far is using an ODBC [RDO] connector and setting a connection string in the report because it seems that Crystal Reports cannot detect it, even though I've configured a system DSN. This creates a dependence between the report and the server (Host name).

Is there any way to change/set the connection string and the host name in the report programatically ? (vb.net)

In all tests I've done seems that Crystal Reports can't detect Sybase's DSN even though other programs do so in the same machine.

If I can't find any better choice, I will use ODBC but I would like to use native ASE Sybase client connector because we install it with the same configuration in all our customers and this makes very easy to deploy the solution.

This last option only works inside developement enviroment, not in runtime.

Thanks in advance

Toni

0
Former Member

I think that the problem, using OLEDB, is that from the report I can only select "Sybase OLEDB Provider" when the provider sould be "ASEOLEDB.1" as the databsase server is Sybase ASE 15.7

Thanks

0