Crystal Formula Error

What is the main reason for this error when creating a formula in crystal?  I am getting this error on all of my formulas, they contain UDF's that I am sourcing from the SO_Header, the UDF's are on the SO_PickingSheetWrk table and that is where the formulas are going to go.

  • 0

    That is a general formula syntax error.  CR thinks the formula is completed, before the highlighted text.

    Most commonly, if you use Basic Syntax, for nicely formatted formulas each line has to end in "_" to tell CR that the formula is not done yet.

  • 0 in reply to Kevin M

    Yes I had to change the syntax for most of the formulas to crystal.  I am struggling to figure out how to keep item codes from duplicating on the form.  I'm using the multi-part form shadow text function and I can't tell if one of the detail section is showing up twice or if one section is just duplicating?  My section "b" is the section containing {@shadowtext}<>"WT" to include misc item types.

  • 0 in reply to jland47

    ShadowText is always fun to test.  For complex logic I tend to hard code each value into the report until I have it working properly (allows you to Preview while troubleshooting).  Also remember that the CR values are case sensitive (unless you do case conversion).

    For line duplication, preview the report, then use DFDM to look at the work table data (M4T copy of the work table, including Sage login and date/time stamp in the file name).  It often doesn't look like you'd expect (especially when it comes to lot/serial values).

  • 0

    This usually occurs when there is a data type mismatch or logic error in the formula. To locate the exact position where the error is being generated, click OK to the message. The cursor should show where the issue is occurring. Usually it is right before the flashing cursor. Here is a non exhaustive list of areas to check:

    1. Check for missing or extra parenthesis ()
    2. Check for missing semi-colons ; at end of If-Then statements
    3. Check for proper concatenation of string fields
      Example:{YourDataSource.Field1} & " " & {YourDataSource.Field2})
    4. Check for the word "end" after Select-Case statements.
  • 0 in reply to Kevin M

    Think I got all the errors fixed, but learned you can not preview on Premium SQL? Is this correct? Still having an issue with my "SO_PickingSheetWrk.CommentText" field, I have it above my "details a" section in a group header b section, no suppression on the "group header b" where the comment field is located.  However can't get anything to show up on the printed report?

  • 0 in reply to jland47

    You can't Preview any report that uses a "work table" as the data source.  That data is generated in temp copies of the table, only populated using the Sage printing function, and inaccessible in Crystal Reports.

    Post your section suppression formulas if you want help with them... but typically you'd want your comments to print in a Details section (the way Sage does).  Printing of a non-aggregate line value in a group section will be inconsistent.

  • 0 in reply to Kevin M

    Placing the "commentText" field in the details section did the trick, not sure how I have it working in the current environment with it in the header section, your way seems easier.  One other question on shadow text, fields with no suppression logic are easy to apply the shadow text logic but the fields that I have logic on are giving me trouble.  When it is just the field I use

    to suppress, however I have this field that is showing up on both forms, guessing my formula is wrong to get the suppression, here's the field suppression formula.

     If ({@ShadowText}<>"WT") then
    If (
    ({SO_PickingSheetWrk.UDF_ASI} = "Y") or
    ({SO_PickingSheetWrk.UDF_MONOGRAMMING} = "Y") or
    ({SO_PickingSheetWrk.UDF_SCREENPRINT} = "Y") or
    ({SO_PickingSheetWrk.UDF_VINYL} = "Y") or
    ({SO_PickingSheetWrk.UDF_DIGITALP} = "Y") 
    ) Then False
    Else True

  • 0 in reply to jland47

    You're missing the Sage default suppression logic.

    The way I would typically merge my logic with Sage's is something like:

    (my logic in brackets)


    (Sage logic in brackets)