Showing posts with label webapplication. Show all posts
Showing posts with label webapplication. 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