Solved

Crystal Reports ocx VB4(16) - Error 515

Posted on 1997-03-22
2
2,547 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
  • 2
2 Comments
 

Accepted Solution

by:
james fasnacht earned 50 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

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…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

810 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