×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

VB & Crystal Resources
3

VB & Crystal Resources

VB & Crystal Resources

(OP)
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

RE: VB & Crystal Resources

2
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
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: VB & Crystal Resources

(OP)
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

RE: VB & Crystal Resources

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
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: VB & Crystal Resources

(OP)
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.

RE: VB & Crystal Resources

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
http://www.kenhamady.com/
Crystal Reports Training/Consulting and a
Quick Reference Guide to VB/Crystal (including ADO)

RE: VB & Crystal Resources

(OP)
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

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close