Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3363
  • Last Modified:

using text object value from crystal report into formula editor

i have a text box object in my crystal report form,(named txtName) and i've assign a value to it...let say "My Name". I want to create a formulae that used the text box value....like, "I want to print this" & txtName.value, but this method won't work..:D please somebody help me..;D
0
craduza
Asked:
craduza
  • 3
  • 3
  • 2
1 Solution
 
mlmccCommented:
I don't think you can get at the text box values from Crystal.  

Instead of a text box create a formula

Name - MyTextBox
Formula
'My Name'

You should be able to use the formula in your other formula.

mlmcc
0
 
craduzaAuthor Commented:
the problem is...the txtName value will always changed depending on user input
0
 
GJParkerCommented:
<< the problem is...the txtName value will always changed depending on user input >>

how does the value change ? text boxes can't be edited by users at run time.

Could you use a parameter field ? to hold the name and then use this in your formula.

Gary



0
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

 
craduzaAuthor Commented:
th value of the text box is changed within a VB Form. Just passing the value to the txtName on code
0
 
GJParkerCommented:
In that case you can use mlmcc idea nad instead of passing the value to a text box via code amend your code to pass the value to a formula.

create a formula with a single space inside double quotes.

then yuo can pass the value to this at runtime using the Text property of the formula object i.e.

Report.FormulaFields.Item(1).text = "My Name"

Gary


0
 
mlmccCommented:
Actually you need to include the quotes in the text replacement

Use

Report.FormulaFields.Item(1).text = " 'My Name' "

or

Report.FormulaFields.Item(1).text = chr(34) & "My Name" & chr(34)

mlmcc



0
 
craduzaAuthor Commented:
i've solved the problem. Just add the needed field in my query...:D thankz for ur help...:D
0
 
mlmccCommented:
Glad I could help

mlmcc
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now