cancel
Showing results for 
Search instead for 
Did you mean: 

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

Former Member
0 Kudos

Hi I'am new to crystal reports. I inherited vb.net 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

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Moved to .NET SDK forum.

Need more info...

Version of VS or Dev tool/Language being used?

What version of the CR assemblies are you using? Look in for crpe32.dll, it will give us the exact version, search your PC, it's not included in the project.

Are you trying to rename the formula or alter the text within the formula, IE the actual formula?

Or are you trying to update a field within the formula text?

Try doing in CR Designer what you want to do in code and then emulate the same steps in code.

Don

Answers (0)