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!

VB & Crystal Resources 3

Status
Not open for further replies.

jflmeing

Programmer
Jan 10, 2001
30
US
I would like to learn how to incorporate running certain Crystal Reports I have already created into a VB application. Are there any resources out there to get me started? I have created a simple report, that accesses my SQL database, but do not know where to start.

Thank you,
Jennifer Fleming
 
What version of CR are you using?

There is some free stuff on the Seagate Web Site, as well as the Seagate developers guide. There are also a couple of books out there that you can buy, including mine.

One other that is quite popular is the George Peck "Complete Reference to Crystal Reports" available for V7 and V8. It covers everything Crystal, including the different integration methods. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
I am using Crystal 8. I have figured out how to add a Crystal report to a VB application. Now,, how do I send parameters to a CR using the ICRDesigner and the CRViewer. I found the .ParameterFields, but when I try to use (0) as the first parameter, I get an error.

Thank you,
Jennifer
 
The RDC requires the actual number of that parameter in the report. Are you using the RDC?

If you don't know, give me the line that launches the report and I can tell. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
This is a simple example. This report requires a parameter. When I run the report, the parameter window pops-up. I would like to pass the value to hte parameter, based on a string in a text box.


Private Sub Form_Load()

Screen.MousePointer = vbHourglass
CRViewer1.ReportSource = Report
CRViewer1.ViewReport
Screen.MousePointer = vbDefault

End Sub

Thank you,
Jennifer

P.S. I am looking into purchasing the Crytal 8 Reference Guide.
 
You need a line that says:

report.ParameterFields(1).AddCurrentValue ("Ken")

The number 1 means that this is the first parameter in the report parameter list. The value in quotes is the value being passed. I used a literal, but you would pass your variable value in that argument. Ken Hamady
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)
 
Thank you. I was using the ParameterFields(0) as the first parameter. I guess the array notation is not the same for the Crystal Parameters as in VB.

One last question, how can I send a report directly to the printer, without having to click the OK button on the print dialog box?

Thank you for all your insight.

Jennifer Fleming
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top