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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass string from vb

Status
Not open for further replies.

sern

Programmer
Jan 8, 2003
31
MY
Hi. I wish to pass a string to a formula in Crystal Report 7 from my VB project. I have created a formula in crystal report named Description. In my vb, I have the below code,

rpt.Formulas(1) = "Description='" & str & "'"

where str is the string containing text and apostrophe (').
When I run the system, it show me the error:
Error in formula <Description>.
&quot;Testing 'ABC' Only&quot;
The remaining text does not appear to be part of the formula.

Please help on this. Thanks.
 
A simpler approach is to set a parameter value from VB and use it in your formula.

hth,
- Ido

CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks IdoMillet. Now the program runs without any errors.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top