Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Help - Trying to set text property on FormulaFieldDefinition but get error

Hi I'am new to crystal reports. I inherited project that uses crystal reports. When trying to set the text property on the FormulaFieldDefinition object I get and error message "Error in formula name reserved characters cannot be used in formula name. When I debug the app I notice two things:

1.text property value is Nothing

2.The text that I'm trying to set is a literal ie.  "Company Name"

Here is a snippet of the code

form_field_defs = cur_report.rReportDocument.DataDefinition.FormulaFields

        For form_num = 0 To cur_report.uReport.iMaxFormulas - 1

            form_field_def = form_field_defs.Item(cur_report.uReport.sFormulas(cur_report.uReport.NAME_COL, form_num))

            form_field_def.Text = cur_report.uReport.sFormulas(cur_report.uReport.VALUE_COL, form_num)

        Next form_num

cur_report.uReport.sFormulas(cur_report.uReport.VALUE_COL, form_num) Returns a literal of the name of the "Company"

Please help

Thanks in advance

Kevin McNeal

Former Member
Not what you were looking for? View more on this topic or Ask a question