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

How to pass variables from VB to CR8? 1

Status
Not open for further replies.

bobgsysop

Programmer
Nov 3, 2000
25
US
Hi-

I'm using Crystal Reports ver 8 and VB6.

I gather some information in VB I want to send to the report - a few fields are used as selection criteria, which works fine, and some are simply variables I want to print. I can't figure out how to pass these simple values into the report.

I'm using "CRViewer1.ViewReport" to launch the report viewer.

Thanks in advance for your help!

Regards,
Bob



 
You are using the RDC to launch the report. You can add a formula to the report that contains a literal text string for testing like:

'my formula'

and then pass your text to the .text property of this formula:

report.FormulaFields(1).Text =

What you pass has to have the quotes added, because it has to be accepted by CR as a valid formula. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thanks Ken - that sure was a fast reply! And - it worked like a charm. (I just ordered your Quick Reference book!)

Regards,
Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top