Solved

Crystal Reports ocx VB4(16) - Error 515

Posted on 1997-03-22
2
2,539 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now