VB.Net 2003 and CR.Net that is bundled with it.
To handle multi-lingual applications, I have to extract and replace values in TextObject of reports.
For most objects I have no problem.
TextObjects containing "special fields" are causing me a lot of troubles. For example, if I have a TextObject like this on a report:
Page {PageNumber} de {Total Page Count}
I can only get "Page de " when I extract the Text property from it and replacing the values in it at run-time is causing an exception.
Any ideas how I can detect that a textObject contains special fields.
This is a portion of the code I am using to extract the Text property of TextObject:
For Each objX As ReportObject In pReportObjects
If TypeOf (objX) Is TextObject Then
Dim strObjectName As String
strObjectName = objX.Name
Dim objTO As TextObject = CType(objX, CrystalDecisions.CrystalReports.Engine.TextObject)
DisplayStatus("TextObject " & strObjectName & " : " & objTO.Text, 2)
UpdateDB(pstrTable, pReportName, strObjectName, "Text", objTO.Text)
End If
Next
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com