Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 904
  • Last Modified:

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!
0
arcross
Asked:
arcross
1 Solution
 
peter57rCommented:
if you point at {dtPDFReport.E1} in the field explorer or on the report it should tell what the datatype is.
0
 
PrakashRaoBSCommented:
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".
0
 
mlmccCommented:
Try it this way

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

mlmcc
0
 
arcrossAuthor Commented:
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..
0
 
mlmccCommented:
Had the field changed type?

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

mlmcc
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now