Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to Change the value of a Formula of the Report from Delphi

Posted on 2003-11-05
4
Medium Priority
?
615 Views
Last Modified: 2007-12-19
Error:502 Invalid Text or Object Handle
Formulas.SetIndex(1) <PEGetHandleString-Formula Name>


I got the said error when i tried changing the value of my formula from Delphi 7.(Note that I'm using CRW 9.2.2, Delphi 7 and correct VCL).

Crpe1 is from TRCrpe, then i added the ff code in Delphi:
Crpe1.FormulaByName('Formula1').Formula.Text := 'Test';

That line caused the above error to appear. I tried executing Formulas.Count in delphi and was able to get the correct number of formulas in my report. I even tried to get the value of Formulas.IndexOf('Formula1'), and was able to get a value for this.

Pls help. Thanks.
0
Comment
Question by:dctara
[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
4 Comments
 
LVL 101

Accepted Solution

by:
mlmcc earned 252 total points
ID: 9686937
Try it this way

Crpe1.Fomulas('Formula1').Text = 'Test';

mlmcc
0
 
LVL 13

Assisted Solution

by:EwaldL
EwaldL earned 248 total points
ID: 9735314
There was a bug once in CR 9's API calls about formulas. As the VCL is only a wrapper around those calls you may want to install the hotfix listed in
http://support.crystaldecisions.com/library/kbase/articles/c2013208.asp

Also, I could imagine that this formula syntax might throw an error as the Delphi's ' ' surrounding the word Text should not become part of the formula. So maybe to keep it easiest you could use a formula that outputs a number and set it to '1' in code instead
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

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…
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 …
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

597 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