Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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.
 
Example:
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
SIBE
Posted 27-May-13 17:16pm
Edited 27-May-13 19:33pm
v10
Comments
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.
—SA
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...)
 
—SA
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.
—SA
Aarti Meswania at 28-May-13 2:27am
   
is this a static word cient & customer
or you want clientname and customername?

1 solution

Rate this: bad
good
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 | :)
  Permalink  

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



Advertise | Privacy | Mobile
Web04 | 2.8.1411022.1 | Last Updated 28 May 2013
Copyright © CodeProject, 1999-2014
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