Showing posts with label developed. Show all posts
Showing posts with label developed. Show all posts

Thursday, March 29, 2012

Error exporting report

Hello

I've developed an ASP.NET WebApplication (VS.NET 2002) with some Crystal Reports in it to report the data.

This reports are automatically exported into a pdf-File (using the Report.Export function)

To give the user the ability to change the language of the WebApp, all the texts are stored in a MS SQL 2000 Database.

I set the Text-Property of the TextObject in the Report with the following code:

Dim TextObjekt As CrystalDecisions.CrystalReports.Engine.TextObject
TextObjekt = Report.ReportDefinition.ReportObjects.Item("Text14")
TextObjekt.Text = Data.Tables(0).Rows(0).Item("TransText") & ":"

I thought this works fine, till I changed the Text in the database.

Examples:

1.) Text in the database = "Mobil 1"
--> The report works fine, the PDF is successfully created and the TextObject shows "Mobil 1:"

2.) Text in the database = "Hello Echo"
--> The Report works and the PDF is created, but the TextObject shows "Hello Ec"

3.) Text in the database = "PSA"
--> Report.Export crashes with the following error:
"Error #5 - Error in file C:\DOKUME~1\STEFAN\ASPNET\LOKALE~1\Temp\temp_c67a4fca-9bd3-4aa6-935b-0ad7a389f034.rpt:
Error found in Export-DLL : \n0\nCrystalDecisions.CrystalReports.Engine"

Has anyone an idea how I can solve this absolutly strange problem?

Thanks and best regards
GulliwahnDoes that PSA have any special charaters?
Do very Database on the Report and try againsql

Friday, March 9, 2012

Error connecting to sql server

I have a perplexing problem. I've developed an ASP application for our internal business use. I'm getting ready to launch, but every once in a while the application can't connect to the database. The error I get is:

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

We (IT and I) turned off the remote connections and it still happens. I'm afraid of launching without understanding what causes this and gettign a fix. To get it working again, we restart IIS and it works fine. I used VWD 2005 Express and it's running on SQL Server 2005 Express.

Thanks for any help you may have.
Scott J.

Don't let the bit about "does not allow remote connections" send you down the wrong path - this ridiculous error message is posted regardless of the actual problem (one of Microsoft's worst error messages).

The part to concentrate on is the final part of the error message, which differs depending on the actual error - in your case error: 40 - Could not open a connection to SQL Server. Are you sure that the SQL Express instance is actually running when you get this problem (is it periodically stopping?). Check it via the services applet - restarting IIS may simply be restarting the Express instance.