Writing Code
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Writing Code
Message Icon Topic: Modifying a formula field in code Post Reply Post New Topic
Author Message
billev
Newbie
Newbie
Avatar

Joined: 19 May 2007
Location: United States
Online Status: Offline
Posts: 9
Quote billev Replybullet Topic: Modifying a formula field in code
    Posted: 01 Jan 2012 at 5:57pm
I have a formula in my report called Dummy which is equal to a string called "dummy".
 
In code I Say:
MyReport.DataDefinition.FormulaFields("Dummy").text = "Smarty"
 
When I run the report, I get the error "The remaining text does not appear to be part of the formula."
 
Any help would be appreciated.
 
visual studio 2005 and Crystal that came with it.
 
Thanks, Bill V.


Edited by billev - 01 Jan 2012 at 5:58pm
Thanks,

Bill V
IP IP Logged
asam
Newbie
Newbie
Avatar

Joined: 08 Jan 2011
Online Status: Offline
Posts: 20
Quote asam Replybullet Posted: 25 Jan 2012 at 4:12am
Here is what I have used successfully:  this.DataDefinition.FormulaFields["line2"].Text = "'Yes'";
(Note the [] and single quotes inside double quotes)!

 

 

IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.