Click to See Complete Forum and Search --> : Crystal Reports


CecileR
May 4th, 2001, 05:59 AM
Anyone i need your help please.
I have code using Crystal report Automation and I declared Formula Field in Crystal Designer.
But when running the code it stops to the part of previewing and says:

Error 20515:
Field: 'Hotels'
"Hello"
This text is not part of the formula field..

This is the part of the code:

Set crapp = CreateObject("Crystal.CRPE.Application")
Set crpReport = crapp.OpenReport("C:\Autocall\Reports\Rpt\percent.rpt")
Set crpedefs = crpReport.FormulaFields
Set crpedef = crpedefs.Item(1)
crpedef.Text = "Hello"
crpReport.Preview

What's wrong with my code..pls help me.
thanks.

Cecile


The more u read, the more u do not know

James Longstreet
May 4th, 2001, 03:28 PM
Pass the value in quotes like
""Hello""


Jim Hewitt
Software Developer
Liberty Tax Service
www.LibertyTax.com

CecileR
May 4th, 2001, 09:18 PM
I tried what u said but it tells an error:
Expected end of statement.

I think this is not possible

cecile

The more u read, the more u do not know

CecileR
May 4th, 2001, 09:27 PM
Hey Thanks for the tip..
I change it to

cpedff.Text = "'Hello'"

and it works :-)

cecile

The more u read, the more u do not know