Click here to Skip to main content
11,496,146 members (662 online)
The site is currently in read-only mode for maintenance. Posting of new items will be available again shortly.
Dear all!
In my report, I design a TextObject with Text and DataField. When I change text of it, whole TextObject will be convert to Text. I want to change only the text but keep DataField format in VB.NET.

The TexboxObject have 2 element: Client: {ProjectObjectName}. I want to change Client =>Customer by programming. But DataField {ProjectObjectName} changed to text.

Many thanks in advance and
best regard
Posted 27-May-13 17:16pm
Edited 27-May-13 19:33pm
Sergey Alexandrovich Kryukov at 27-May-13 22:23pm
Sorry, not a question. As we don't know what kind of help you need, you hardly can expect a helping answer.
huyenchi119 at 28-May-13 0:34am
I edited my question. Please help me!
Sergey Alexandrovich Kryukov at 28-May-13 0:39am
Where is the definition of TextObject?

(Bad name, by the way. This is like naming a class using the word "class" in it, or *.EXE file using the word "application" in it...)

huyenchi119 at 28-May-13 0:50am
I have multiple report, I want to replace all by programming. I use dll CrystalCrystalDecisions.CrystalReports.Engine.dll, and my code is:
DirectCast(RptReportObject("Text3"), CrystalDecisions.CrystalReports.Engine.TextObject).Text = DirectCast(RptReportObject("Text3"), CrystalDecisions.CrystalReports.Engine.TextObject).Text.Replace("Client","Customer")
Sergey Alexandrovich Kryukov at 28-May-13 1:07am
Sorry, you did not answer my question.
Aarti Meswania at 28-May-13 2:27am
is this a static word cient & customer
or you want clientname and customername?

1 solution

you should use datafield
dragdrop datafield
right click it
open Display "expression Formula" window
now write whatever you did in textbox text
save & run
Happy Coding!
Smile | :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 RyanDev 230
1 Sergey Alexandrovich Kryukov 114
2 Richard Deeming 100
3 OriginalGriff 89
4 Mostafa Asaduzzaman 59
0 Sergey Alexandrovich Kryukov 10,401
1 OriginalGriff 8,910
2 Sascha Lefèvre 3,899
3 Maciej Los 3,422
4 Richard Deeming 2,600

Advertise | Privacy | Mobile
Web03 | 2.8.150520.1 | Last Updated 28 May 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100