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

Linking Using a formula

Status
Not open for further replies.

gazza11

Technical User
Jan 12, 2003
46
AU
I have asked the question in Crystal Data Access forum of how to pass a parameter from VB to a Crystal report that is embedded in VB (ie dsr).
It does not look as though anyone is familiar with the way of doing this and my requirement is now urgent.

In summary I have a sub report that is linked to a main report parameter field and instead of getting asked for the number (as happens corretly), I want to pass it automatically. Since I can use VB to write my number (EmployID) into a text box on the main form (or sub report) I was wondering whether anyone can help me with a formula to get the sub report to use this value to select data on.

 
The correct approach for your situation is to pass the value from VB into a main report Parameter (NOT into a text box).

Then pass that parameter value into the linked subreport.

Cheers,
- Ido CUT, Visual CUT, and DataLink Viewer:
view, e-mail, export, burst, distribute, and schedule Crystal Reports.
 
Thanks for the help. I am using CR 8.5. I acknowledge that the best way is to pass the parameter but that is what I am having trouble doing. In my VB code I used CRObject.parameterfields.count (where CRobject is my report) and it showed I had 2 parameters which is correct but I am only using 1.
I have a variable (number) iCurrentEmployeeID that I am trying to pass as a parameter. I used CRobject.parameterfields(0) = "iCurrentEmployeeID;0;true" but it gives me a subscript out of range error.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top