Solved

using text object value from crystal report into formula editor

Posted on 2004-09-08
8
2,569 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
  • 3
  • 3
  • 2
8 Comments
 
LVL 100

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
Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

 
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 100

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 100

Expert Comment

by:mlmcc
ID: 12050409
Glad I could help

mlmcc
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

726 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