?
Solved

Crystal Reports ocx VB4(16) - Error 515

Posted on 1997-03-22
2
Medium Priority
?
2,594 Views
Last Modified: 2012-08-14
Hi,  I have a small problems...well a big one really.  When using the Crystall reports OCX in my VB4-16 project.  I keep getting an error (515)in setting the SELECTIONFORMULA field.  The formula I am setting is:

CrystalReport1.SelectionFormula = "{Info.MthSelect} = 1;"

{Info.MthSelect} is an integer field

This formula works in the Crystal report designer in the record selection area but will not work when called from CODE.

The crystal reports version is 3.x

I assume from the error code that the formula is not correct and I can only guess that it is the systax???.

0
Comment
Question by:Parkie
[X]
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
  • 2
2 Comments
 

Accepted Solution

by:
james fasnacht earned 150 total points
ID: 1424448
Error: 515 - Invalid formula

The "Error in formula" warning indicates that Crystal is unable to evaluate a formula in the report. A common reason is that a formula is being set incorrectly from an application, refer to the Technical Support Document for the programming language you are using.

Another reason is that in v3 of Crystal Reports, the .SelectionFormula property of the CRYSTAL.VBX appends to any selection formula already in the report whereas previous versions overwrote. Clear the selection formula in the report to solve this problem (ensure that not even an empty space is left). This also applies to the updated VBXs on our BBS for v2 Pro (PROVBX.ZIP) and v2 for VB (VBVBX.ZIP).

Also, reports created with the Pro version may contain formulas that use functions from the Additional Functions list. The code for these functions actually exists externally from CRW in files that begin with "UFL" and end with ".DLL". In v3 two UFLs are included, UFLSAMP1.DLL and UFLDTS.DLL (for v2 Pro only UFLSAMP1.DLL is included), these need to be in the same location as the CRPE.DLL that is being loaded by an application for them to be found.
0
 

Expert Comment

by:james fasnacht
ID: 1424449
Glad I could help.
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

718 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