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

How do you pass values from VB6 to a formula field in crystal 8.5?

Status
Not open for further replies.

iannuzzelli

Programmer
Jan 4, 2003
36
US
I usually use the OCX and new to the report viewer.

Here is my environment:

1. I am Using the Viewer on a form, not OCX.

2. I created a simple formula used to hold a string.

Formula name on Report is CompanyName

3. I am assigning the report via file name of a predefined report, not using the designer. Here is my code

Set GReport = GReportApp.OpenReport("categ.rpt")

4. I get the message: The remaining text does not appear to be part of the formula. I then get a blank report.

code I am using to assign formula:
GReport.FormulaFields(1).Text = "ABC Company"


Can anyone please show me how to pass the values the correct way?

Thank-you in advance
 
I resolved my issue. I needed to read a little.

Thanks
 
Hi
You mentioned your problem and then you posted afterwards that you had resolved you problem by yourself. I'm interested in the solution. Can you please pass is through ?

Thankx in advance

Pedro...
 
You need to get the Formula Name before you send.

example:
GReport.FormulaFields.GetItemByName("Bank1").Text = BankName


Where Bank1 is the name of the formula in your report

Hope this helps!


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top