Click here to Skip to main content
12,406,592 members (48,353 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 16:16pm
Updated 27-May-13 18: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
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160730.1 | Last Updated 28 May 2013
Copyright © CodeProject, 1999-2016
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