Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Crystal Reports HELP

Posted on 2012-08-30
4
Medium Priority
?
309 Views
Last Modified: 2012-08-30
I am quite a newbie to Crystal Reports so bear with me if I do not provide all the relevant information first off.

Below is my formula:

if {?ARR_DEP} = "A" then
{FLIGHTD_ALL.ACTUAL}
else
if {FLIGHTD_ALL.CANCEL_CODE} = "C" then
"" 
else
{FLIGHTD_ALL.OFFCHOCKS}

when I attempt to validate the formula advises me that a sring is required.

Any advice or guidance would be much appreciated.
0
Comment
Question by:Sandston04
  • 2
  • 2
4 Comments
 

Accepted Solution

by:
Sandston04 earned 0 total points
ID: 38349884
I have managed to solve my own question with the following code:

if {?ARR_DEP} = "D" and {FLIGHTD_ALL.CANCEL_CODE} <> "C" then
"" 
else
if {?ARR_DEP} = "A" and {FLIGHTD_ALL.CANCEL_CODE} <> "" then
ToText({FLIGHTD_ALL.ACTUAL})
else
ToText({FLIGHTD_ALL.OFFCHOCKS})
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 38350115
Issue - A formula can only return 1 type of value. (string, number, etc)

Apparently some of the fields you return are strings and others are non-strings (dates, numbers, etc.)
Crystal looks at the first value you return and all the rest must match it.

mlmcc
0
 

Author Comment

by:Sandston04
ID: 38350133
Hi thanks for still posting that comment as I didnt know that fact.

Thank you
0
 
LVL 101

Expert Comment

by:mlmcc
ID: 38350259
That is why I posted, to explain the issue behind the error message

mlmcc
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

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…

577 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