Link to home
Start Free TrialLog in
Avatar of arcross
arcrossFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Crystal report 'String Is required here' when field is number

Hello,
I created a table in my xsd file to create a report. The table is filled from a query.
Ive got some fields in that table defined as DOUBLE.

Im creating a report using that table. I placed a number field in the report, then add a formula for backcolor like:
If {dtPDFReport.E1} = 0 THEN
    Yellow
ELSE
    NoColor

When i try to run the report I get:

"Error in formula <Back_Color>.
'If {dtPDFReport.E1}=0 THEN
'
A string is required here."

This is driving me crazy. I did a similar report before and it was fine.

any ideas on this? thanks!
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PrakashRaoBS
PrakashRaoBS

Go to  "Format Editor"  -> Font ->Color. Try writing your formula in Color formula editor to change font color & to change background color use "Highlighting Expert" .
Right click on the field to get "Format Editor" / "Highlighting Expert".
Try it this way

If {dtPDFReport.E1} = 0 THEN
    crYellow
ELSE
    crNoColor

mlmcc
Avatar of arcross

ASKER

I recreated the datatable in my datatable with the correct data types and that solved it. But before with same data types didnt work ...strange..
Had the field changed type?

Did you ever try using the VERIFY DATABASE option to reread the database for the report?

mlmcc