arcross
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!
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Try it this way
If {dtPDFReport.E1} = 0 THEN
crYellow
ELSE
crNoColor
mlmcc
If {dtPDFReport.E1} = 0 THEN
crYellow
ELSE
crNoColor
mlmcc
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
Did you ever try using the VERIFY DATABASE option to reread the database for the report?
mlmcc
Right click on the field to get "Format Editor" / "Highlighting Expert".