Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing crlf to formula in runtime .NET

Status
Not open for further replies.

nmehta

Programmer
Sep 19, 2002
5
0
0
US
Hi,

I am creating a Crystal Report in runtime based on a dataset. I added a formula field to the report footer that will be used to store error information. When I tried setting the formula text in runtime to my error string, I get the "The matching " for this string is missing." I need to pass carriage returns to the formula in order for the error string to display correctly.

I looked in the Knowledge base and found article c2003015. However, I tried this, and it did not work. Can someone please let me know what I need to do? Here's the code:

Dim crFormulas As FormulaFieldDefinitions
Dim crFormulaError As FormulaFieldDefinition
crFormulas = crReportDocument.DataDefinition.FormulaFields
crFormulaError = crFormulas.Item(1)
crFormulaError.Text = Chr(34) & "Please" & Chr(10) & "Work"

I've also tried the following:
crFormulaError.Text = Chr(34) & "Please + 'Chr(10)' + Work"
crFormulaError.Text = Chr(34) & "Please + 'Chr(13)' + Work"
crFormulaError.Text = Chr(34) & "Please" & Chr(13) & "Work"

PLEASE HELP!!!

Thanks,
NM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top