I have run into that problem before too. There are several ways to get

that message.

1.) When I have several reports made for one application and in some

reports I pass formula values and in other reports I don't, I have to make

sure that all the formula indexes are empty before proceding.

Example:

Report # 1 contains these formulas that I pass values to.

CrystalReport1.Formulas(0) = "Formula1 = 'String Value' "

CrystalReport1.Formulas(1) = "Formula2 = 123 "

CrystalReport1.Formulas(2) = "Formula3 = 'Another Value' "

Report # 2 contains no formulas, therefore I must make the indexed formula

values empty, otherwise the error occurs.

CrystalReport1.Formulas(0) = ""

CrystalReport1.Formulas(1) = ""

CrystalReport1.Formulas(2) = ""

2.) The formula name was incorrect.

CrystalReport1.Formulas(0) = "FormulaName = 0"

should have been

CrystalReport1.Formulas(0) = "FormulaNames = 0"

3.) The value passed was an invalid type.

CrystalReport1.Formulas(0) = "FormulaName = 0" was numeric and should

have been a string.

Hope this helps.

SMDavis

Quote:

> I have a vb form which accepts user input and constructs a Selection

> Formula. The program also has two dialog boxes, one to get the location

> of the report file and the other to get the location of the database

> file. When I run my program, I get an error that says:

> Error 20515

> Error in formula

> Then it points me to the line:

> crptReport.Active = 1

> Someone please help.