Solved

Crystal Reports ocx VB4(16) - Error 515

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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 …
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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
Course of the Month5 days, 13 hours left to enroll

626 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