Click here to Skip to main content
11,920,211 members (47,447 online)
Rate this:
Please Sign up or sign in to vote.
See more: VB Visual-Studio VS2010 VB.NET , +
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 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 28-May-13 0:34am
I edited my question. Please help me!
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 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")
Sorry, you did not answer my question.
Aarti Meswania 28-May-13 2:27am
is this a static word cient & customer
or you want clientname and customername?

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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 OriginalGriff 455
1 phil.o 170
2 CPallini 150
4 F-ES Sitecore 130
0 OriginalGriff 6,778
1 KrunalRohit 4,495
2 Sergey Alexandrovich Kryukov 3,153
3 George Jonsson 2,810
4 Suvendu Shekhar Giri 2,181

Advertise | Privacy | Mobile
Web03 | 2.8.151120.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