Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run-time error '20515'

Status
Not open for further replies.

Buzzwrd

Programmer
Mar 26, 2002
3
US
I am using Crystal Reports version 8.5 with VB 6.0 and creating a report that uses the MakeArray function within a formula. Everything works fine on the develpment PC but when I try to run the report of the client PC I get a "Run-time error '20515' Error in formula".
I have included every reference I can think of in the Package Deployment Wizard and the client Crystal .dll's are up to date. Any ideas???
 
20515 Error In Formula

This is caused by the syntax used when passing a formula to a report. For Example: CrystalReport1.Formulas(0) = "Fname = 'Joe's Diner'" As far a Crystal Reports is concerned, the single quote is ending the text portion of the formula and the remaining text will not appear to be part of the formula. Crystal Reports will read the formula as 'Joe', disregarding the rest.

To solve this, double quotes have to be passed instead of single quotes around the text portion of the formula For example: CrystalReport1.Formulas(0) = "Fname = ""Joe's Diner""" Craig, mailto:sander@cogeco.ca
"Procrastination is the art of keeping up with yesterday."
I hope my post was helpful!!!
 
Interesting solution but I'm not using quotes for this formula and I don't know why the syntax would work on my development PC but not my client's. I am building an array in this formula which will add a number from the array to an inactive count depending upon the county number. It looks like this:
(County #1 add 2, County #2 add 80...I have to add 1 to the county_id because my county numbers in the DBase actually start at zero)
Code:
NumberVar Array ImportedInactive := MakeArray(2,80,173,267,208,116,150,214,29,0,62,5,50,211,33,54,21,18,50,24,33,10,13,39,29,19,14,27,25,11,55,34,23,0,9,74,13,0,5,5,22,3,0,8,5,7,11,3,5,37,0,18,5,0,23,1,172);
{#InactiveCount} + ImportedInactive[ {COUNTY.COUNTY_ID} +1]
 
This is how I resolved the problem.
I upgraded my application from using Crystal Reports ver. 7 to ver. 8.5 and added other controls which required using the VB Package and Deployment Wizard to create a new installation package.
When creating the new package, crpe32.dll is included but when you try to create the package you receive:

Code:
Unexpected error number 80010108 has occurred: Automation error.  The object invoked has disconnected from its clients.

After some research I found that this is a known bug.
When you remove the reference to crpe32.dll, the package builds fine but after running the setup on the client PC the new ver. 8 reports have problems with some formulas.

When I copied the newest version of the crpe32.dll (02/09/2001) to the client the problem resolved itself.

I hope that this helps someone before they too spend much time banging their head on a monitor.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top