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
Solved

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

Posted on 2003-11-05
4
588 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
4 Comments
 
LVL 100

Accepted Solution

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

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

mlmcc
0
 
LVL 13

Assisted Solution

by:EwaldL
EwaldL earned 62 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: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Suggested Solutions

Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

790 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