Solved

using text object value from crystal report into formula editor

Posted on 2004-09-08
8
2,749 Views
Last Modified: 2012-06-22
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
Comment
Question by:craduza
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
8 Comments
 
LVL 101

Expert Comment

by:mlmcc
ID: 12013048
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
 
LVL 1

Author Comment

by:craduza
ID: 12013130
the problem is...the txtName value will always changed depending on user input
0
 
LVL 19

Expert Comment

by:GJParker
ID: 12014684
<< 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
On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

 
LVL 1

Author Comment

by:craduza
ID: 12014697
th value of the text box is changed within a VB Form. Just passing the value to the txtName on code
0
 
LVL 19

Expert Comment

by:GJParker
ID: 12014745
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
 
LVL 101

Accepted Solution

by:
mlmcc earned 50 total points
ID: 12023313
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
 
LVL 1

Author Comment

by:craduza
ID: 12042817
i've solved the problem. Just add the needed field in my query...:D thankz for ur help...:D
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 12050409
Glad I could help

mlmcc
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question